From 49b93c6e0e6288dc3e94e000619045d741f330f1 Mon Sep 17 00:00:00 2001 From: Ulrich Dangel Date: Mon, 2 Nov 2009 20:36:14 +0100 Subject: [PATCH] Use grml-core for bootparameter handling. --- debian/control | 2 +- etc/init.d/grml-misc | 4 +++- etc/init.d/grml-reboot | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index a7cdad8..b6aa4ea 100644 --- a/debian/control +++ b/debian/control @@ -13,7 +13,7 @@ Architecture: all Replaces: automount-knoppix Suggests: grml-desktop, grml-shlib, grml-files, grml-docs, grml-sectools, grml-templates, grml-x, policyrcd-script-zg2 Recommends: dillo, eterm, python, vim (>= 7.0) -Depends: grml-scripts (>= 0.9), grml-etc-core (>= 0.3) +Depends: grml-scripts (>= 0.9), grml-etc-core (>= 0.3), grml-core Conflicts: smbconf-pfeifle, grml-etc-core (<= 0.2.25), grml-sysvinit Description: ecetera files for the grml system This package includes some /etc files for the diff --git a/etc/init.d/grml-misc b/etc/init.d/grml-misc index 1dd0537..bd8c2bd 100755 --- a/etc/init.d/grml-misc +++ b/etc/init.d/grml-misc @@ -7,7 +7,9 @@ # Latest change: Sam Mai 27 14:43:56 CEST 2006 [mika] ################################################################################ -if grep -q nocolor /proc/cmdline ; then +. /usr/lib/grml/core.sh + +if checkbootparam nocolor ; then RC_NOCOLOR=yes . /etc/grml/lsb-functions else diff --git a/etc/init.d/grml-reboot b/etc/init.d/grml-reboot index 81ab23a..157d04f 100755 --- a/etc/init.d/grml-reboot +++ b/etc/init.d/grml-reboot @@ -8,6 +8,7 @@ export PATH=/sbin:/bin:/usr/bin:/usr/sbin +. /usr/lib/grml/core.sh . /etc/grml_colors . /etc/grml/lsb-functions @@ -23,16 +24,15 @@ REMOVABLE=false USB_DEVICE=false NOPROMPT=${NOPROMPT:-false} NOEJECT=${NOEJECT:-false} -CMDLINE="$(cat /proc/cmdline 2>/dev/null)" # Check if we are running from a GRML-CD or HD [ -e /etc/grml_cd ] || INSTALLED=true # Assume that we don't want the eject+prompt stuff when running in one # of the special modes: -grep -qe 'toram' -qe '2ram' -qe 'usb' -qe 'serial' \ - -qe 'fromhd' -qe 'isofrom' -qe 'fromiso' -qe 'findiso' \ - /proc/cmdline && INSTALLED=true +checkbootparam 'toram' || checkbootparam '2ram' || checkbootparam 'usb' \ +checkbootparam 'serial' || checkbootparam 'fromhd' || checkbootparam 'isofrom' \ +checkbootparam 'fromiso' || checkbootparam 'findiso' && INSTALLED=true # detect cdrom device if ! $INSTALLED ; then -- 2.1.4