aboutsummaryrefslogtreecommitdiffstats
path: root/testing/syslinux/syslinux.post-upgrade
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-11-04 15:17:01 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-11-04 15:17:01 +0000
commit826a14f13ee1fabeb973f094d17140a24fc429c5 (patch)
treec348f9a5f10897a41eb9da98bfc221afe5ac0087 /testing/syslinux/syslinux.post-upgrade
parentdb74557de78aef004e6e475ee2f48bc7db78602e (diff)
downloadaports-826a14f13ee1fabeb973f094d17140a24fc429c5.tar.bz2
aports-826a14f13ee1fabeb973f094d17140a24fc429c5.tar.xz
main/syslinux upgrade to 6.02
Diffstat (limited to 'testing/syslinux/syslinux.post-upgrade')
-rw-r--r--testing/syslinux/syslinux.post-upgrade61
1 files changed, 0 insertions, 61 deletions
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 @@
-#!/bin/sh
-
-# find given append opt
-get_append_opt() {
- awk -v search="$1" '
- $1 == "append" || $1 == "APPEND" {
- split($0, a);
- for (i in a) {
- if (index(a[i], search) == 1) {
- print a[i];
- }
- }
- }' /boot/extlinux.conf | sort | uniq
-}
-
-# print default kernel options
-get_default_opts() {
- awk '
- $1 == "append" || $1 == "APPEND" {
- opts="";
- space="";
- split($0, a);
- for (i in a) {
- if (i != 1 \
- && (index(a[i], "root=") != 1) \
- && (index(a[i], "initrd=") != 1) \
- && (index(a[i], "modules=") != 1)) {
- opts = opts space a[i];
- space = " ";
- }
- }
- print opts;
- }
- ' /boot/extlinux.conf | sort | uniq
-}
-
-if ! [ -f /boot/extlinux.conf ]; then
- exit 0
-fi
-
-# check if we already have a generated extlinux.conf
-if grep -q '^# Generated by update-extlinux' /boot/extlinux.conf; then
- exit 0
-fi
-
-# try fish out the kernel opts from extlinuix.conf's append line
-root=$(get_append_opt 'root=' | head -n 1)
-modules=$(get_append_opt 'modules=' | head -n 1)
-opts=$(get_default_opts | head -n 1)
-
-# populate update-extlinux.conf with the info we know
-if [ -n "$root" ]; then
- sed -i -e "/^root=/s|.*|$root|g" /etc/update-extlinux.conf
-fi
-if [ -n "$modules" ]; then
- sed -i -e "/^modules=/s|.*|$modules|g" /etc/update-extlinux.conf
-fi
-if [ -n "$opts" ]; then
- sed -i -e "/^default_kernel_opts=/s|.*|default_kernel_opts=\"$opts\"|g" /etc/update-extlinux.conf
-fi
-