diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-04 15:17:01 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-04 15:17:01 +0000 |
commit | 826a14f13ee1fabeb973f094d17140a24fc429c5 (patch) | |
tree | c348f9a5f10897a41eb9da98bfc221afe5ac0087 | |
parent | db74557de78aef004e6e475ee2f48bc7db78602e (diff) | |
download | alpine_aports-826a14f13ee1fabeb973f094d17140a24fc429c5.tar.bz2 alpine_aports-826a14f13ee1fabeb973f094d17140a24fc429c5.tar.xz alpine_aports-826a14f13ee1fabeb973f094d17140a24fc429c5.zip |
main/syslinux upgrade to 6.02
-rw-r--r-- | main/syslinux/APKBUILD | 25 | ||||
-rw-r--r-- | main/syslinux/syslinux-3.86-nopie.patch | 11 | ||||
-rw-r--r-- | testing/syslinux/APKBUILD | 65 | ||||
-rw-r--r-- | testing/syslinux/syslinux.post-upgrade | 61 | ||||
-rw-r--r-- | testing/syslinux/syslinux.trigger | 3 | ||||
-rwxr-xr-x | testing/syslinux/update-extlinux | 212 | ||||
-rw-r--r-- | testing/syslinux/update-extlinux.conf | 66 |
7 files changed, 16 insertions, 427 deletions
diff --git a/main/syslinux/APKBUILD b/main/syslinux/APKBUILD index 7d95f456e9..191ae4915b 100644 --- a/main/syslinux/APKBUILD +++ b/main/syslinux/APKBUILD | |||
@@ -1,13 +1,13 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=syslinux | 2 | pkgname=syslinux |
3 | pkgver=5.10 | 3 | pkgver=6.02 |
4 | pkgrel=4 | 4 | pkgrel=0 |
5 | _ver=${pkgver/_/-} | 5 | _ver=${pkgver/_/-} |
6 | pkgdesc="Boot loader for the Linux operating system" | 6 | pkgdesc="Boot loader for the Linux operating system" |
7 | url="http://syslinux.org" | 7 | url="http://syslinux.org" |
8 | arch="x86 x86_64" | 8 | arch="x86 x86_64" |
9 | license="GPL" | 9 | license="GPL" |
10 | makedepends="nasm perl util-linux-dev" | 10 | makedepends="nasm perl util-linux-dev gnu-efi-dev" |
11 | depends="mtools blkid mkinitfs" | 11 | depends="mtools blkid mkinitfs" |
12 | triggers="syslinux.trigger=/boot" | 12 | triggers="syslinux.trigger=/boot" |
13 | install="syslinux.post-upgrade" | 13 | install="syslinux.post-upgrade" |
@@ -18,7 +18,13 @@ source="https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-$_ver.tar. | |||
18 | update-extlinux.conf | 18 | update-extlinux.conf |
19 | update-extlinux | 19 | update-extlinux |
20 | " | 20 | " |
21 | subpackages="$pkgname-doc" | 21 | subpackages="$pkgname-doc $pkgname-dev" |
22 | |||
23 | _loaderarch= | ||
24 | case "$CARCH" in | ||
25 | x86) _loaderarch=efi32;; | ||
26 | x86_64) _loaderarch=efi64;; | ||
27 | esac | ||
22 | 28 | ||
23 | _builddir="$srcdir"/$pkgname-$_ver | 29 | _builddir="$srcdir"/$pkgname-$_ver |
24 | prepare() { | 30 | prepare() { |
@@ -33,12 +39,13 @@ prepare() { | |||
33 | build() { | 39 | build() { |
34 | cd "$_builddir" | 40 | cd "$_builddir" |
35 | unset LDFLAGS | 41 | unset LDFLAGS |
36 | make installer || return 1 | 42 | make $_loaderarch installer || return 1 |
37 | } | 43 | } |
38 | 44 | ||
39 | package() { | 45 | package() { |
40 | cd "$_builddir" | 46 | cd "$_builddir" |
41 | make INSTALLROOT="$pkgdir" MANDIR=/usr/share/man local-install | 47 | make -j1 INSTALLROOT="$pkgdir" MANDIR=/usr/share/man \ |
48 | bios $_loaderarch install || return 1 | ||
42 | 49 | ||
43 | mkdir -p "$pkgdir"/etc/update-extlinux.d | 50 | mkdir -p "$pkgdir"/etc/update-extlinux.d |
44 | cp "$srcdir"/update-extlinux.conf "$pkgdir"/etc/ | 51 | cp "$srcdir"/update-extlinux.conf "$pkgdir"/etc/ |
@@ -47,12 +54,12 @@ package() { | |||
47 | chmod 755 "$pkgdir"/sbin/update-extlinux | 54 | chmod 755 "$pkgdir"/sbin/update-extlinux |
48 | } | 55 | } |
49 | 56 | ||
50 | md5sums="67c8a85ca275d13b4f7f6139dd47d999 syslinux-5.10.tar.xz | 57 | md5sums="6f275813a1b08cf852e55c0a3f8fbc78 syslinux-6.02.tar.xz |
51 | 603c7e3745c2cdded5332c7acb390fa0 update-extlinux.conf | 58 | 603c7e3745c2cdded5332c7acb390fa0 update-extlinux.conf |
52 | 89fb72c4dd47516402bc91a3cdf2b4d5 update-extlinux" | 59 | 89fb72c4dd47516402bc91a3cdf2b4d5 update-extlinux" |
53 | sha256sums="4b52d7647d5584c69764c06a836e0d524e5246bf2e94f68cf86342c415508422 syslinux-5.10.tar.xz | 60 | sha256sums="afa31b7cbf72e1c0c1752a0636ba724ce01c0e374366e46e61db6862b4685478 syslinux-6.02.tar.xz |
54 | 99c8864958daf6f7bb2460082ceb809e0ce49aec3f0b847c7644565da14595e3 update-extlinux.conf | 61 | 99c8864958daf6f7bb2460082ceb809e0ce49aec3f0b847c7644565da14595e3 update-extlinux.conf |
55 | 0dce3d534ab4288872c7654d7408d35896f508d486ad7d02cdaaf5fee37f6ae5 update-extlinux" | 62 | 0dce3d534ab4288872c7654d7408d35896f508d486ad7d02cdaaf5fee37f6ae5 update-extlinux" |
56 | sha512sums="56422e14b4aa53ca1a5811da0582dbbb349aa52b9e78868bbedc24c67ef2420c4d0ac63fd68c7f0adc2c22606196276265d503b5b6f9d3d796d9ce42845bbdb5 syslinux-5.10.tar.xz | 63 | sha512sums="919d165e9cba2b964cec8b015f0a4281a5f90e908f247441d6edefe289170e697b933554d12fa90e698b6d2e8b5b40fdb3b7a95d746a41c580e3a44f8859818f syslinux-6.02.tar.xz |
57 | 6e01a8c181812218eef38f183475d5b96079cbefe635b57b23cb2322fed552ff4d0c3e974a7defa7ea84b015659725b35aee247bc1ab9dc5903ffd124ae7ff25 update-extlinux.conf | 64 | 6e01a8c181812218eef38f183475d5b96079cbefe635b57b23cb2322fed552ff4d0c3e974a7defa7ea84b015659725b35aee247bc1ab9dc5903ffd124ae7ff25 update-extlinux.conf |
58 | 848940244b9547c8d5d721b494cda199ea5785e306e8ac2124640f89ba7837d4a6e3a9a09fd2c5cd662d3ba66c5f81fcb1ec1f52fae9fade45b1ff10d7fc2b61 update-extlinux" | 65 | 848940244b9547c8d5d721b494cda199ea5785e306e8ac2124640f89ba7837d4a6e3a9a09fd2c5cd662d3ba66c5f81fcb1ec1f52fae9fade45b1ff10d7fc2b61 update-extlinux" |
diff --git a/main/syslinux/syslinux-3.86-nopie.patch b/main/syslinux/syslinux-3.86-nopie.patch deleted file mode 100644 index 262a4c15ca..0000000000 --- a/main/syslinux/syslinux-3.86-nopie.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- ./com32/MCONFIG.orig | ||
2 | +++ ./com32/MCONFIG | ||
3 | @@ -25,6 +25,8 @@ | ||
4 | $(call gcc_ok,-falign-loops=0,-malign-loops=0) \ | ||
5 | $(call gcc_ok,-mpreferred-stack-boundary=2,) \ | ||
6 | $(call gcc_ok,-mincoming-stack-boundary=2,) \ | ||
7 | + $(call gcc_ok,-nopie,) \ | ||
8 | + $(call gcc_ok,-fno-pie,) \ | ||
9 | -march=i386 -Os -fomit-frame-pointer -mregparm=3 -DREGPARM=3 | ||
10 | |||
11 | com32 = $(topdir)/com32 | ||
diff --git a/testing/syslinux/APKBUILD b/testing/syslinux/APKBUILD deleted file mode 100644 index 191ae4915b..0000000000 --- a/testing/syslinux/APKBUILD +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | ||
2 | pkgname=syslinux | ||
3 | pkgver=6.02 | ||
4 | pkgrel=0 | ||
5 | _ver=${pkgver/_/-} | ||
6 | pkgdesc="Boot loader for the Linux operating system" | ||
7 | url="http://syslinux.org" | ||
8 | arch="x86 x86_64" | ||
9 | license="GPL" | ||
10 | makedepends="nasm perl util-linux-dev gnu-efi-dev" | ||
11 | depends="mtools blkid mkinitfs" | ||
12 | triggers="syslinux.trigger=/boot" | ||
13 | install="syslinux.post-upgrade" | ||
14 | options="textrels" | ||
15 | ldpath="/usr/share/syslinux" | ||
16 | #source="http://www.kernel.org/pub/linux/utils/boot/syslinux/${pkgver%%.*}.xx/$pkgname-$_ver.tar.bz2 | ||
17 | source="https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-$_ver.tar.xz | ||
18 | update-extlinux.conf | ||
19 | update-extlinux | ||
20 | " | ||
21 | subpackages="$pkgname-doc $pkgname-dev" | ||
22 | |||
23 | _loaderarch= | ||
24 | case "$CARCH" in | ||
25 | x86) _loaderarch=efi32;; | ||
26 | x86_64) _loaderarch=efi64;; | ||
27 | esac | ||
28 | |||
29 | _builddir="$srcdir"/$pkgname-$_ver | ||
30 | prepare() { | ||
31 | cd "$_builddir" | ||
32 | for i in $source; do | ||
33 | case "$i" in | ||
34 | *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; | ||
35 | esac | ||
36 | done | ||
37 | } | ||
38 | |||
39 | build() { | ||
40 | cd "$_builddir" | ||
41 | unset LDFLAGS | ||
42 | make $_loaderarch installer || return 1 | ||
43 | } | ||
44 | |||
45 | package() { | ||
46 | cd "$_builddir" | ||
47 | make -j1 INSTALLROOT="$pkgdir" MANDIR=/usr/share/man \ | ||
48 | bios $_loaderarch install || return 1 | ||
49 | |||
50 | mkdir -p "$pkgdir"/etc/update-extlinux.d | ||
51 | cp "$srcdir"/update-extlinux.conf "$pkgdir"/etc/ | ||
52 | sed "/^version=/s/=.*/=$pkgver-r$pkgrel/" "$srcdir"/update-extlinux \ | ||
53 | > "$pkgdir"/sbin/update-extlinux | ||
54 | chmod 755 "$pkgdir"/sbin/update-extlinux | ||
55 | } | ||
56 | |||
57 | md5sums="6f275813a1b08cf852e55c0a3f8fbc78 syslinux-6.02.tar.xz | ||
58 | 603c7e3745c2cdded5332c7acb390fa0 update-extlinux.conf | ||
59 | 89fb72c4dd47516402bc91a3cdf2b4d5 update-extlinux" | ||
60 | sha256sums="afa31b7cbf72e1c0c1752a0636ba724ce01c0e374366e46e61db6862b4685478 syslinux-6.02.tar.xz | ||
61 | 99c8864958daf6f7bb2460082ceb809e0ce49aec3f0b847c7644565da14595e3 update-extlinux.conf | ||
62 | 0dce3d534ab4288872c7654d7408d35896f508d486ad7d02cdaaf5fee37f6ae5 update-extlinux" | ||
63 | sha512sums="919d165e9cba2b964cec8b015f0a4281a5f90e908f247441d6edefe289170e697b933554d12fa90e698b6d2e8b5b40fdb3b7a95d746a41c580e3a44f8859818f syslinux-6.02.tar.xz | ||
64 | 6e01a8c181812218eef38f183475d5b96079cbefe635b57b23cb2322fed552ff4d0c3e974a7defa7ea84b015659725b35aee247bc1ab9dc5903ffd124ae7ff25 update-extlinux.conf | ||
65 | 848940244b9547c8d5d721b494cda199ea5785e306e8ac2124640f89ba7837d4a6e3a9a09fd2c5cd662d3ba66c5f81fcb1ec1f52fae9fade45b1ff10d7fc2b61 update-extlinux" | ||
diff --git a/testing/syslinux/syslinux.post-upgrade b/testing/syslinux/syslinux.post-upgrade deleted file mode 100644 index 90388668de..0000000000 --- a/testing/syslinux/syslinux.post-upgrade +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # find given append opt | ||
4 | get_append_opt() { | ||
5 | awk -v search="$1" ' | ||
6 | $1 == "append" || $1 == "APPEND" { | ||
7 | split($0, a); | ||
8 | for (i in a) { | ||
9 | if (index(a[i], search) == 1) { | ||
10 | print a[i]; | ||
11 | } | ||
12 | } | ||
13 | }' /boot/extlinux.conf | sort | uniq | ||
14 | } | ||
15 | |||
16 | # print default kernel options | ||
17 | get_default_opts() { | ||
18 | awk ' | ||
19 | $1 == "append" || $1 == "APPEND" { | ||
20 | opts=""; | ||
21 | space=""; | ||
22 | split($0, a); | ||
23 | for (i in a) { | ||
24 | if (i != 1 \ | ||
25 | && (index(a[i], "root=") != 1) \ | ||
26 | && (index(a[i], "initrd=") != 1) \ | ||
27 | && (index(a[i], "modules=") != 1)) { | ||
28 | opts = opts space a[i]; | ||
29 | space = " "; | ||
30 | } | ||
31 | } | ||
32 | print opts; | ||
33 | } | ||
34 | ' /boot/extlinux.conf | sort | uniq | ||
35 | } | ||
36 | |||
37 | if ! [ -f /boot/extlinux.conf ]; then | ||
38 | exit 0 | ||
39 | fi | ||
40 | |||
41 | # check if we already have a generated extlinux.conf | ||
42 | if grep -q '^# Generated by update-extlinux' /boot/extlinux.conf; then | ||
43 | exit 0 | ||
44 | fi | ||
45 | |||
46 | # try fish out the kernel opts from extlinuix.conf's append line | ||
47 | root=$(get_append_opt 'root=' | head -n 1) | ||
48 | modules=$(get_append_opt 'modules=' | head -n 1) | ||
49 | opts=$(get_default_opts | head -n 1) | ||
50 | |||
51 | # populate update-extlinux.conf with the info we know | ||
52 | if [ -n "$root" ]; then | ||
53 | sed -i -e "/^root=/s|.*|$root|g" /etc/update-extlinux.conf | ||
54 | fi | ||
55 | if [ -n "$modules" ]; then | ||
56 | sed -i -e "/^modules=/s|.*|$modules|g" /etc/update-extlinux.conf | ||
57 | fi | ||
58 | if [ -n "$opts" ]; then | ||
59 | sed -i -e "/^default_kernel_opts=/s|.*|default_kernel_opts=\"$opts\"|g" /etc/update-extlinux.conf | ||
60 | fi | ||
61 | |||
diff --git a/testing/syslinux/syslinux.trigger b/testing/syslinux/syslinux.trigger deleted file mode 100644 index 1e463cddae..0000000000 --- a/testing/syslinux/syslinux.trigger +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | update-extlinux | ||
diff --git a/testing/syslinux/update-extlinux b/testing/syslinux/update-extlinux deleted file mode 100755 index 26eb4c70b7..0000000000 --- a/testing/syslinux/update-extlinux +++ /dev/null | |||
@@ -1,212 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | version= | ||
4 | default=0 | ||
5 | timeout=5 | ||
6 | verbose=0 | ||
7 | |||
8 | conf=/boot/extlinux.conf | ||
9 | myconf=/etc/update-extlinux.conf | ||
10 | |||
11 | # read in extlinux settings | ||
12 | if [ -f "$myconf" ]; then | ||
13 | . $myconf | ||
14 | fi | ||
15 | |||
16 | everbose() { | ||
17 | if [ "$verbose" = "0" ]; then | ||
18 | return | ||
19 | fi | ||
20 | |||
21 | echo $* | ||
22 | } | ||
23 | |||
24 | ewarn() { | ||
25 | echo "WARNING:" $@ >&2 | ||
26 | } | ||
27 | |||
28 | eerror() { | ||
29 | echo "ERROR:" $@ >&2 | ||
30 | return 1 | ||
31 | } | ||
32 | |||
33 | everbose "Updating extlinux configuration." | ||
34 | |||
35 | if [ "x$root" = "x" ]; then | ||
36 | ewarn "Root device is not specified in $myconf." | ||
37 | blkid_export=$(blkid -o export /dev/root) | ||
38 | if [ -n "$blkid_export" ]; then | ||
39 | export $blkid_export | ||
40 | fi | ||
41 | if [ -z "$UUID" ]; then | ||
42 | # try parse /proc/mount for mounted / | ||
43 | dev=$(awk '$2 == "/" {dev=$1} END {print dev}' /proc/mounts) | ||
44 | if [ -n "$dev" ]; then | ||
45 | blkid_export=$(blkid -o export $dev) | ||
46 | if [ -n "$blkid_export" ]; then | ||
47 | export "$blkid_export" | ||
48 | fi | ||
49 | fi | ||
50 | fi | ||
51 | if [ -z "$UUID" ]; then | ||
52 | if [ -z "$dev" ]; then | ||
53 | eerror "Failed to detect root device" | ||
54 | exit 1 | ||
55 | else | ||
56 | root=$dev | ||
57 | fi | ||
58 | else | ||
59 | root=UUID=$UUID | ||
60 | fi | ||
61 | everbose "Root device is: $root" | ||
62 | fi | ||
63 | |||
64 | rtimeout=$((${timeout}\*10)) | ||
65 | syslinux_menu=menu.c32 | ||
66 | menu_hidden= | ||
67 | |||
68 | # vesa menu has been requested? | ||
69 | if [ "$vesa_menu" = "1" ]; then | ||
70 | syslinux_menu=vesamenu.c32 | ||
71 | fi | ||
72 | |||
73 | umask 0022 | ||
74 | rm -f $conf.new | ||
75 | echo "# Generated by update-extlinux $version" > $conf.new | ||
76 | echo "DEFAULT $syslinux_menu" >> $conf.new | ||
77 | echo "PROMPT 0" >> $conf.new | ||
78 | echo "MENU TITLE Alpine/$(uname -s) Boot Menu" >> $conf.new | ||
79 | if [ "$hidden" = "1" ]; then | ||
80 | echo "MENU HIDDEN" >> $conf.new | ||
81 | fi | ||
82 | echo "MENU AUTOBOOT Alpine will be booted automatically in # seconds." >> $conf.new | ||
83 | echo "TIMEOUT $rtimeout" >> $conf.new | ||
84 | |||
85 | lst=0 | ||
86 | if [ -f "/boot/xen.gz" ]; then | ||
87 | for kernel in $(find /boot -name "vmlinuz-*" -type f); do | ||
88 | tag=$(basename $kernel | cut -b9-) | ||
89 | everbose "Found Xen hypervisor: /boot/xen.gz, kernel: $kernel" | ||
90 | |||
91 | if [ -f "/boot/initramfs-$tag" ]; then | ||
92 | everbose "Found initramfs: /boot/initramfs-$tag" | ||
93 | initramfs="initramfs-$tag" | ||
94 | else | ||
95 | initramfs= | ||
96 | fi | ||
97 | label=xen-$(grep -w -l $tag /usr/share/kernel/*/kernel.release \ | ||
98 | | cut -d/ -f5) | ||
99 | if [ "$label" = "xen-" ]; then | ||
100 | label=xen-$lst | ||
101 | fi | ||
102 | |||
103 | echo "LABEL $label" >> $conf.new | ||
104 | if [ "$label" = "$default" ]; then | ||
105 | echo " MENU DEFAULT" >> $conf.new | ||
106 | fi | ||
107 | echo " MENU LABEL Xen + Linux $tag" >> $conf.new | ||
108 | echo " COM32 mboot.c32" >> $conf.new | ||
109 | echo " APPEND xen.gz $xen_opts --- $(basename $kernel) root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts --- $initramfs" >> $conf.new | ||
110 | echo "" >> $conf.new | ||
111 | lst=$(($lst + 1)) | ||
112 | done | ||
113 | fi | ||
114 | |||
115 | for kernel in $(find /boot -name "vmlinuz-*" -type f); do | ||
116 | tag=$(basename $kernel | cut -b9-) | ||
117 | everbose "Found kernel: $kernel" | ||
118 | label=$(grep -w -l $tag /usr/share/kernel/*/kernel.release | cut -d/ -f5) | ||
119 | if [ -z "$label" ]; then | ||
120 | label=$lst | ||
121 | fi | ||
122 | echo "LABEL $label" >> $conf.new | ||
123 | if [ "$label" = "$default" ]; then | ||
124 | echo " MENU DEFAULT" >> $conf.new | ||
125 | fi | ||
126 | echo " MENU LABEL Linux $tag" >> $conf.new | ||
127 | echo " LINUX $(basename $kernel)" >> $conf.new | ||
128 | if [ -f "/boot/initramfs-$tag" ]; then | ||
129 | everbose "Found initramfs: /boot/initramfs-$tag" | ||
130 | echo " INITRD initramfs-$tag" >> $conf.new | ||
131 | fi | ||
132 | echo " APPEND root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts" >> $conf.new | ||
133 | echo "" >> $conf.new | ||
134 | lst=$(($lst + 1)) | ||
135 | done | ||
136 | |||
137 | if [ -n "$password" ]; then | ||
138 | echo "NOESCAPE 1" >> $conf.new | ||
139 | echo "MENU MASTER PASSWD $password" >> $conf.new | ||
140 | echo "" >> $conf.new | ||
141 | chmod o-r $conf.new | ||
142 | fi | ||
143 | |||
144 | everbose "$lst entries found." | ||
145 | |||
146 | for entry in /etc/update-extlinux.d/*; do | ||
147 | [ -f "$entry" ] && { cat $entry; echo ""; } >> $conf.new | ||
148 | done | ||
149 | |||
150 | echo "MENU SEPARATOR" >> $conf.new | ||
151 | echo "" >> $conf.new | ||
152 | |||
153 | if [ -f "/boot/hdt.c32" ]; then | ||
154 | everbose "Found Hardware Detection Tool: /boot/hdt.c32" | ||
155 | echo "LABEL hdt" >> $conf.new | ||
156 | echo " MENU LABEL Hardware info" >> $conf.new | ||
157 | if [ -n "$password" ]; then | ||
158 | echo " MENU PASSWD" >> $conf.new | ||
159 | fi | ||
160 | echo " COM32 hdt.c32" >> $conf.new | ||
161 | if [ -f "/boot/memtest" ]; then | ||
162 | everbose "Found memtest86+: /boot/memtest" | ||
163 | echo " APPEND memtest=memtest" >> $conf.new | ||
164 | fi | ||
165 | echo "" >> $conf.new | ||
166 | elif [ -f "/boot/memtest" ]; then | ||
167 | everbose "Found memtest86+: /boot/memtest" | ||
168 | echo "LABEL memtest" >> $conf.new | ||
169 | echo " MENU LABEL Memtest86+" >> $conf.new | ||
170 | echo " KERNEL memtest" >> $conf.new | ||
171 | echo "" >> $conf.new | ||
172 | fi | ||
173 | |||
174 | for i in reboot poweroff; do | ||
175 | [ -f "/boot/$i.c32" ] || continue | ||
176 | everbose "Found $i" | ||
177 | # make first char capital | ||
178 | cap=$( echo $i | awk '{sub(".", substr(toupper($0),1,1), $0); print}' ) | ||
179 | echo "LABEL $i" >> $conf.new | ||
180 | echo " MENU LABEL $cap" >> $conf.new | ||
181 | echo " COM32 $i.c32" >> $conf.new | ||
182 | echo "" >> $conf.new | ||
183 | done | ||
184 | |||
185 | if cmp -s $conf.new $conf; then | ||
186 | everbose "Configuration unchanged." | ||
187 | rm $conf.new | ||
188 | fi | ||
189 | |||
190 | if [ "$overwrite" != "1" ]; then | ||
191 | exit 0 | ||
192 | elif [ -f "$conf.new" ]; then | ||
193 | # keep a backup just in case | ||
194 | if [ -f "$conf" ]; then | ||
195 | mv $conf $conf.old | ||
196 | fi | ||
197 | |||
198 | mv $conf.new $conf | ||
199 | fi | ||
200 | |||
201 | everbose "Installing libutil.c32 libcom32.c32 mboot.c32 menu.c32 vesamenu.c32 to /boot." | ||
202 | cp /usr/share/syslinux/libutil.c32 \ | ||
203 | /usr/share/syslinux/libcom32.c32 \ | ||
204 | /usr/share/syslinux/mboot.c32 \ | ||
205 | /usr/share/syslinux/menu.c32 \ | ||
206 | /usr/share/syslinux/vesamenu.c32 \ | ||
207 | /boot | ||
208 | |||
209 | case "$(stat -f -c '%T' /boot)" in | ||
210 | ext*) extlinux --update /boot;; | ||
211 | esac | ||
212 | |||
diff --git a/testing/syslinux/update-extlinux.conf b/testing/syslinux/update-extlinux.conf deleted file mode 100644 index a34d5a9624..0000000000 --- a/testing/syslinux/update-extlinux.conf +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | # configuration for extlinux config builder | ||
2 | |||
3 | # overwrite | ||
4 | # Overwrite current /boot/extlinux.conf. If this is not '1' we will only | ||
5 | # write to /boot/extlinux.conf.new | ||
6 | overwrite=1 | ||
7 | |||
8 | # vesa_menu | ||
9 | # use fancy vesa menu (vesamenu.c32) menus, won't work with serial | ||
10 | vesa_menu=0 | ||
11 | |||
12 | # default_kernel_opts | ||
13 | # default kernel options | ||
14 | default_kernel_opts=quiet | ||
15 | |||
16 | # modules | ||
17 | # modules which should be loaded before pivot_root | ||
18 | modules=sd-mod,usb-storage,ext3 | ||
19 | |||
20 | # root | ||
21 | # root device - if not specified, will be guessed using | ||
22 | # blkid -o export /dev/root | ||
23 | root= | ||
24 | |||
25 | # verbose | ||
26 | # if set to non-zero, update-extlinux will be a lot more verbose. | ||
27 | verbose=0 | ||
28 | |||
29 | # hidden | ||
30 | # if set to non-zero, the boot menu will be hidden by default. | ||
31 | hidden=1 | ||
32 | |||
33 | # timeout | ||
34 | # number of seconds to wait before booting default | ||
35 | timeout=3 | ||
36 | |||
37 | # default | ||
38 | # default kernel to boot | ||
39 | default=grsec | ||
40 | |||
41 | # xen_opts | ||
42 | # options to hand to xen hypervisor, useful ones are: | ||
43 | # dom0_mem=256M (give domain-0 environment 256M ram) | ||
44 | xen_opts=dom0_mem=256M | ||
45 | |||
46 | # if you copy /usr/share/syslinux/reboot.c32 to /boot/, a menu entry | ||
47 | # will be auto-generated for it | ||
48 | |||
49 | # if you copy hdt.c32, libgpl.c32, and libmenu.c32 from /usr/share/syslinux/ | ||
50 | # to /boot/, a menu entry will be auto-generated for HDT | ||
51 | |||
52 | # if you download and install /boot/memtest, then if HDT is present it | ||
53 | # will use it, else a separate menu entry will be auto-generated for | ||
54 | # memtest | ||
55 | |||
56 | # optional password | ||
57 | # you can generate a SHA512 password using: mkpasswd | ||
58 | # | ||
59 | # if you assign a password, you should make this file world-unreadable | ||
60 | # | ||
61 | # if a password is assigned, the menu entries can't be edited at boot | ||
62 | # time, and HDT if present is password-protected | ||
63 | # | ||
64 | # you can also include "MENU PASSWD" in any custom entries you have in | ||
65 | # /etc/update-extlinux.d/ | ||
66 | password='' | ||