diff options
Diffstat (limited to 'initrd.sh')
-rwxr-xr-x | initrd.sh | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/initrd.sh b/initrd.sh deleted file mode 100755 index 252763b..0000000 --- a/initrd.sh +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | initrd=isolinux/linux/initrd.img | ||
4 | vmlinuz=isolinux/linux/vmlinuz | ||
5 | |||
6 | version=$(uname -r) | ||
7 | version=4.5.0-0.bpo.1-amd64 | ||
8 | conf_dir=initramfs-tools | ||
9 | |||
10 | apt_dependencies=initrd-dependencies.txt | ||
11 | |||
12 | find_source_dirs() { | ||
13 | set -- find "$conf_dir" ./old-school "$@" | ||
14 | "$@" | ||
15 | } | ||
16 | |||
17 | force_rebuild() | ||
18 | { | ||
19 | touch "$conf_dir" | ||
20 | return 1 | ||
21 | } | ||
22 | |||
23 | rebuild() | ||
24 | { | ||
25 | [ ! -f "$apt_dependencies" ] || sudo apt-get install -q=10 --no-upgrade -y $(cat "$apt_dependencies") | ||
26 | |||
27 | set -ex | ||
28 | cp -f /boot/vmlinuz-${version} "$vmlinuz" | ||
29 | /usr/sbin/mkinitramfs -d "$conf_dir" -o "$initrd" ${version} || force_rebuild | ||
30 | } | ||
31 | |||
32 | if [ ! -e "$initrd" -o ! -e "$vmlinuz" ]; then | ||
33 | rebuild | ||
34 | elif [ "$(find_source_dirs -newer "$initrd" -print -quit)" ]; then | ||
35 | rebuild | ||
36 | fi | ||