From 69adb8e8aeb143f59afab400d26f8cfd9dcd537b Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 4 Jul 2007 10:54:12 +0200 Subject: [PATCH] grml-setservices: support lvm [Closes: issue239] --- debian/changelog | 6 ++++++ usr_sbin/grml-setservices | 24 +++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index ef61bdd..a9ce8e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +grml-scripts (1.0.7) unstable; urgency=low + + * grml-setservices: support lvm [Closes: issue239] + + -- Michael Prokop Wed, 04 Jul 2007 10:53:51 +0200 + grml-scripts (1.0.6) unstable; urgency=low * zsh-login: support bootoptions startup (allow execution diff --git a/usr_sbin/grml-setservices b/usr_sbin/grml-setservices index 6c47ec9..047982d 100755 --- a/usr_sbin/grml-setservices +++ b/usr_sbin/grml-setservices @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Son Apr 15 10:57:18 CEST 2007 [mika] +# Latest change: Mit Jul 04 10:53:22 CEST 2007 [mika] ################################################################################ PN="$(basename $0)" @@ -41,12 +41,30 @@ or choose cancel. " # enable checks only if the according init script is present +[ -r /etc/init.d/lvm2 ] && LVM='lvm!logical volume management!on' [ -r /etc/init.d/mdadm ] && SRAID='mdadm!software-raid via mdadm!on' [ -r /etc/init.d/dmraid ] && MRAID='dmraid!software-raid via dmraid!off' [ -r /etc/init.d/dbus -o -r /etc/init.d/dbus-1 ] && DBUS='dbus!hal/dbus (important for KDE e.g.)!off' -# adjust setup +## adjust setup +# logic: +# if is_value_set +# remove_from_runlevel.conf +# set_up_defaults_as_intented_in_/var/lib/dpkg/info/$PACKAGE.postinst +# else +# remove_from_runlevel.conf +# set_up_only_for_stop_to_prevent_reactivation_via_maintainer_scripts_on_upgrade set_values(){ + if [ -n "$LVM" ] ; then + if is_value_set "lvm" ; then + update-rc.d -f lvm2 remove >/dev/null 2>&1 + update-rc.d lvm2 start 26 S . start 50 0 6 . + else + update-rc.d -f lvm2 remove >/dev/null 2>&1 + update-rc.d lvm2 stop 20 0 1 6 . >/dev/null 2>&1 + fi + fi + if [ -n "$SRAID" ] ; then if is_value_set "mdadm" ; then update-rc.d -f mdadm remove >/dev/null 2>&1 @@ -84,7 +102,7 @@ set_values(){ # the interface itself oifs="$IFS" IFS='!' -$DIALOG --title "$PN" --checklist "$INFO" 30 65 8 $SRAID $MRAID $DBUS 2>$TMP +$DIALOG --title "$PN" --checklist "$INFO" 30 65 8 $LVM $SRAID $MRAID $DBUS 2>$TMP retval="$?" case $retval in -- 2.1.4