diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-22 12:48:10 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-02-22 12:48:10 +0000 |
commit | e69409a284e7a3d08bbbe363c7cc8d596edc482a (patch) | |
tree | 8b06a32dd5e7656e59b63106dd05f05bfc60a59d /main/syslinux | |
parent | bcfeb8c51075c4c0ae092d88f558deeb9311ef0d (diff) | |
download | aports-e69409a284e7a3d08bbbe363c7cc8d596edc482a.tar.bz2 aports-e69409a284e7a3d08bbbe363c7cc8d596edc482a.tar.xz |
main/syslinux: run extlinux --update
Diffstat (limited to 'main/syslinux')
-rw-r--r-- | main/syslinux/APKBUILD | 12 | ||||
-rwxr-xr-x | main/syslinux/update-extlinux | 39 |
2 files changed, 30 insertions, 21 deletions
diff --git a/main/syslinux/APKBUILD b/main/syslinux/APKBUILD index 82fbce3421..60d5a82c61 100644 --- a/main/syslinux/APKBUILD +++ b/main/syslinux/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=syslinux pkgver=5.01 -pkgrel=0 +pkgrel=1 pkgdesc="Boot loader for the Linux operating system" url="http://syslinux.org" arch="x86 x86_64" @@ -35,15 +35,17 @@ package() { mkdir -p "$pkgdir"/etc/update-extlinux.d cp "$srcdir"/update-extlinux.conf "$pkgdir"/etc/ - cp "$srcdir"/update-extlinux "$pkgdir"/sbin/ + sed "/^version=/s/=.*/=$pkgver-r$pkgrel/" "$srcdir"/update-extlinux \ + > "$pkgdir"/sbin/update-extlinux + chmod 755 "$pkgdir"/sbin/update-extlinux } md5sums="6c21244277fa4e444967ba45469de863 syslinux-5.01.tar.bz2 7ef73a7a858b8aa1ac6635d6391ac8e5 update-extlinux.conf -7bf8f54cedf0bd30909e61559d19dc9c update-extlinux" +e913057f9cef3e96af9b14513cda65dc update-extlinux" sha256sums="2e4955dfb1f58ed7a4f82f50fbc2ebd4ca18f8d8399803b033a74fdaf137a252 syslinux-5.01.tar.bz2 ee970729e981ee1756ffe97f0cdda652d1e82773993310eeecfca1f2ddbe718b update-extlinux.conf -d661e0bdd1fedead06ab54ec4ee548473a2a3a401c52aa0287f9c17782626e8e update-extlinux" +0dfc79031c794f363ec3d30042901d0d8b921e5f61b27d51add2bcbeda5c4d7b update-extlinux" sha512sums="0c075aff27bacf8c1958a344cb118ba20c5869d4b37deac156e0cf0ae8cdc6deab58d611c95d62b377b921e579a058f45306ba6253445ecfc6cd8437737407ab syslinux-5.01.tar.bz2 d0c5a0891841623c8905864caadf58866d4b9f1f893725712c6813af6cb6d64f0c08f2a3783fda56fcb1cbcc1a0a73e65562339f5591f38ee5cb213b2d16c680 update-extlinux.conf -6024530fc79465cb75ecedb7e3dcdd6834700dd315acd47e061b46c7c6df784f1e53f925038bd64451c161deb97fc16d7c2eeb664969d17bd10d3f2e46ccb446 update-extlinux" +1959fef099950089548a98ae38694577343b576464b681a09171315f54281e43deeffb420c5d3a8fb348e9099d1f9b0e4ad6e5065b081300dcd7f9854b695008 update-extlinux" diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index d96713ae30..7288861932 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -1,5 +1,6 @@ #!/bin/sh +version= default=0 timeout=5 verbose=0 @@ -60,12 +61,6 @@ if [ "x$root" = "x" ]; then everbose "Root device is: $root" fi -everbose "Installing mboot.c32 to /boot." -cp /usr/share/syslinux/mboot.c32 /boot - -everbose "Installing menu.c32 to /boot." -cp /usr/share/syslinux/menu.c32 /boot - rtimeout=$((${timeout}\*10)) syslinux_menu=menu.c32 menu_hidden= @@ -75,12 +70,9 @@ if [ "$vesa_menu" = "1" ]; then syslinux_menu=vesamenu.c32 fi -everbose "Installing $syslinux_menu to /boot." -cp /usr/share/syslinux/vesamenu.c32 /boot - umask 0022 rm -f $conf.new -echo "# Generated by update-extlinux" > $conf.new +echo "# Generated by update-extlinux $version" > $conf.new echo "DEFAULT $syslinux_menu" >> $conf.new echo "PROMPT 0" >> $conf.new echo "MENU TITLE Alpine/$(uname -s) Boot Menu" >> $conf.new @@ -156,12 +148,27 @@ for entry in /etc/update-extlinux.d/*; do [ -f "$entry" ] && cat $entry >> $conf.new done -if [ "$overwrite" = "1" ]; then - # keep a backup just in case - if [ -f "$conf" ]; then - mv $conf $conf.old - fi +if [ "$overwrite" != "1" ]; then + exit 0 +fi - mv $conf.new $conf +# keep a backup just in case +if [ -f "$conf" ]; then + mv $conf $conf.old fi +mv $conf.new $conf + +everbose "Installing mboot.c32 to /boot." +cp /usr/share/syslinux/mboot.c32 /boot + +everbose "Installing menu.c32 to /boot." +cp /usr/share/syslinux/menu.c32 /boot + +everbose "Installing $syslinux_menu to /boot." +cp /usr/share/syslinux/vesamenu.c32 /boot + +case "$(stat -f -c '%T' /boot)" in +ext*) extlinux --update /boot;; +esac + |