grml-setservices: support NFS
authorMichael Prokop <mika@grml.org>
Wed, 18 Jul 2007 00:16:27 +0000 (02:16 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 18 Jul 2007 00:16:27 +0000 (02:16 +0200)
debian/changelog
usr_sbin/grml-setservices

index fa90776..e6445f5 100644 (file)
@@ -1,3 +1,9 @@
+grml-scripts (1.0.10) unstable; urgency=low
+
+  * grml-setservices: support NFS
+
+ -- Michael Prokop <mika@grml.org>  Wed, 18 Jul 2007 02:16:18 +0200
+
 grml-scripts (1.0.9) unstable; urgency=low
 
   * grml-hostname: adjust mydestination as well in /etc/postfix/main.cf.
index 047982d..3da5728 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # 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]
+# Latest change: Mit Jul 18 02:16:12 CEST 2007 [mika]
 ################################################################################
 
 PN="$(basename $0)"
@@ -45,6 +45,7 @@ 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/nfs-common ] && NFS='nfs!Network File System (client setup)!off'
 
 ## adjust setup
 # logic:
@@ -97,12 +98,22 @@ set_values(){
         update-rc.d dbus 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 $NFS 2>$TMP
 
 retval="$?"
 case $retval in