diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-19 09:25:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-05-19 09:29:27 +0000 |
commit | 66417d5e0c7870c269104b633e9d82c4554a8380 (patch) | |
tree | a45cca19ab25b844b25513d4973c5db460a04e13 /main | |
parent | df68969b81691b765f7bc224cc40bd648bb457de (diff) | |
download | aports-66417d5e0c7870c269104b633e9d82c4554a8380.tar.bz2 aports-66417d5e0c7870c269104b633e9d82c4554a8380.tar.xz |
main/syslinux: make trigger not fail on lxc
on lxc we dont have the boot device available so extlinux will fail.
We cannot check for `openrc --sys` because apk run the trigger in chroot
and grsecurity will prevent openrc access /proc/1/environment.
So we simply add a --warn-only option and use that from trigger.
Diffstat (limited to 'main')
-rw-r--r-- | main/syslinux/APKBUILD | 8 | ||||
-rw-r--r-- | main/syslinux/syslinux.trigger | 2 | ||||
-rwxr-xr-x | main/syslinux/update-extlinux | 35 |
3 files changed, 37 insertions, 8 deletions
diff --git a/main/syslinux/APKBUILD b/main/syslinux/APKBUILD index 1bc5a43d93..c45bc084ff 100644 --- a/main/syslinux/APKBUILD +++ b/main/syslinux/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=syslinux pkgver=6.03 -pkgrel=0 +pkgrel=1 _ver=${pkgver/_/-} pkgdesc="Boot loader for the Linux operating system" url="http://syslinux.org" @@ -56,10 +56,10 @@ package() { md5sums="92a253df9211e9c20172796ecf388f13 syslinux-6.03.tar.xz 38d206b75b1096ba5df6cfabf455ab06 update-extlinux.conf -35b78e9ed4b7a4feb79f4fc04102acd2 update-extlinux" +3d4d2ba9cd397ed1379d5e7b3e1da951 update-extlinux" sha256sums="26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e syslinux-6.03.tar.xz d0b7b869489d0ac1529dd742d8d88844ea4e0a5d893de5218b250b97f68e55f2 update-extlinux.conf -9f7925bedb1611f5c3b6456fa13d21992743b5a92d2f1f8699cd63a0f207ca93 update-extlinux" +a7dbf66a25bb2b222fbd5731650426f869b1f994a0782d8825e02d3f4d359dbc update-extlinux" sha512sums="dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31 syslinux-6.03.tar.xz f304068ee174e531890fed20b05d962e6c076160c470ed9cf0d822ff56917793ecabec8c0495b045a740f1f63412a55fbb1fa4b4231b18f76c8584b55f51306d update-extlinux.conf -73ba856bff89d5f23790819c8aeaca95ec336aba96fe6591a2e65345caace658b93627e0f42621d3bd2d70303107d27a9db36cb17648eef110576749e5194f04 update-extlinux" +d94a2559285c31ebcb9e9d4dfe042e5c553e972e1bad8719acf697c4c0db40c5372d714c8f65cf62d9bc8892cc5c85989fcb7708b07be0a6307184784a0e5a53 update-extlinux" diff --git a/main/syslinux/syslinux.trigger b/main/syslinux/syslinux.trigger index 1e463cddae..fe91f43791 100644 --- a/main/syslinux/syslinux.trigger +++ b/main/syslinux/syslinux.trigger @@ -1,3 +1,3 @@ #!/bin/sh -update-extlinux +update-extlinux --warn-only diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux index 2efb7cb6f4..10e2feb5b0 100755 --- a/main/syslinux/update-extlinux +++ b/main/syslinux/update-extlinux @@ -30,6 +30,30 @@ eerror() { return 1 } +usage() { + echo "usage: $0 [-v|--verbose] [--warn-only]" +} + +while [ $# -gt 0 ]; do + opt="$1" + shift + case "$opt" in + -v|--verbose) + verbose=1 + ;; + --warn-only) + warn_only=1 + ;; + --) + break + ;; + -*) + usage + exit 1 + ;; + esac +done + everbose "Updating extlinux configuration." if [ "x$root" = "x" ]; then @@ -50,8 +74,13 @@ if [ "x$root" = "x" ]; then fi if [ -z "$UUID" ]; then if [ -z "$dev" ]; then - eerror "Failed to detect root device" - exit 1 + if [ -n "$warn_only" ]; then + ewarn "Failed to detect root device. extlinux.conf is not updated" + exit 0 + else + eerror "Failed to detect root device" + exit 1 + fi else root=$dev fi @@ -218,6 +247,6 @@ cp /usr/share/syslinux/libutil.c32 \ /boot case "$(stat -f -c '%T' /boot)" in -ext*) extlinux --update /boot;; +ext*) extlinux --update /boot || [ -n "$warn_only" ];; esac |