X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_sbin%2Fgrml-setservices;h=1d8e146c8efb58f09beee4e9e9b8aeb65e49f7c2;hb=74367b9f37596ec5c775c4e44a3ecf45366a2232;hp=047982dccb86325c6713ea1d6bc25b05a75d3ad7;hpb=69adb8e8aeb143f59afab400d26f8cfd9dcd537b;p=grml-scripts.git diff --git a/usr_sbin/grml-setservices b/usr_sbin/grml-setservices index 047982d..1d8e146 100755 --- a/usr_sbin/grml-setservices +++ b/usr_sbin/grml-setservices @@ -1,10 +1,9 @@ -#!/bin/sh +#!/bin/bash # Filename: grml-setservices # Purpose: interface for basic configuration of system startup # 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: Mit Jul 04 10:53:22 CEST 2007 [mika] ################################################################################ PN="$(basename $0)" @@ -22,7 +21,7 @@ bailout(){ exit 0 } -trap bailout 1 2 3 15 +trap bailout HUP INT QUIT TERM is_value_set(){ [ -n "$1" ] || return 2 @@ -45,6 +44,8 @@ or choose cancel. [ -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' +[ -r /etc/init.d/hal ] && HAL='hal!Hardware Abstraction Layer daemon (important for KDE e.g.)!off' +[ -r /etc/init.d/nfs-common ] && NFS='nfs!Network File System (client setup)!off' ## adjust setup # logic: @@ -97,12 +98,32 @@ set_values(){ update-rc.d dbus stop 20 0 1 6 . >/dev/null 2>&1 fi fi + + if [ -n "$HAL" ] ; then + if is_value_set "hal" ; then + update-rc.d -f hal remove >/dev/null 2>&1 + update-rc.d hal start 24 2 3 4 5. stop 16 0 1 6 . >/dev/null 2>&1 + else + update-rc.d -f hal remove >/dev/null 2>&1 + update-rc.d hal stop 20 0 1 6 . >/dev/null 2>&1 + fi + fi + + if [ -n "$NFS" ] ; then + if is_value_set "nfs" ; then + update-rc.d -f nfs-common remove >/dev/null 2>&1 + update-rc.d nfs-common start 20 2 3 4 5 . stop 20 0 1 6 . start 44 S . >/dev/null 2>&1 + else + update-rc.d -f nfs-common remove >/dev/null 2>&1 + update-rc.d nfs-common stop 20 0 1 6 . >/dev/null 2>&1 + fi + fi } # the interface itself oifs="$IFS" IFS='!' -$DIALOG --title "$PN" --checklist "$INFO" 30 65 8 $LVM $SRAID $MRAID $DBUS 2>$TMP +$DIALOG --title "$PN" --checklist "$INFO" 30 65 8 $LVM $SRAID $MRAID $DBUS $HAL $NFS 2>$TMP retval="$?" case $retval in