[Glibc-bsd-commits] r3138 - trunk/zfsutils/debian

Aurelien Jarno aurel32 at alioth.debian.org
Fri Aug 6 02:21:26 UTC 2010


Author: aurel32
Date: 2010-08-06 02:21:25 +0000 (Fri, 06 Aug 2010)
New Revision: 3138

Added:
   trunk/zfsutils/debian/zfsutils.zfs.init
Modified:
   trunk/zfsutils/debian/changelog
   trunk/zfsutils/debian/rules
Log:
  * Add an initscript to mount/umount filesystems. Closes: bug#591823.



Modified: trunk/zfsutils/debian/changelog
===================================================================
--- trunk/zfsutils/debian/changelog	2010-08-06 02:12:44 UTC (rev 3137)
+++ trunk/zfsutils/debian/changelog	2010-08-06 02:21:25 UTC (rev 3138)
@@ -2,8 +2,9 @@
 
   * Create a /boot/zfs/ directory so that zpool.cache can be created 
     there. Closes: bug#591820.
+  * Add an initscript to mount/umount filesystems. Closes: bug#591823.
 
- -- Aurelien Jarno <aurel32 at debian.org>  Fri, 06 Aug 2010 03:00:03 +0200
+ -- Aurelien Jarno <aurel32 at debian.org>  Fri, 06 Aug 2010 03:45:27 +0200
 
 zfsutils (8.1-1) unstable; urgency=low
 

Modified: trunk/zfsutils/debian/rules
===================================================================
--- trunk/zfsutils/debian/rules	2010-08-06 02:12:44 UTC (rev 3137)
+++ trunk/zfsutils/debian/rules	2010-08-06 02:21:25 UTC (rev 3138)
@@ -121,7 +121,7 @@
 	dh_installchangelogs -a
 	dh_installdocs -a
 #	dh_installexamples
-#	dh_installinit
+	dh_installinit --no-restart-on-upgrade --name=zfs -- start 26 S . stop 50 0 6 .
 #	dh_installcron
 #	dh_installinfo
 	dh_installman

Added: trunk/zfsutils/debian/zfsutils.zfs.init
===================================================================
--- trunk/zfsutils/debian/zfsutils.zfs.init	                        (rev 0)
+++ trunk/zfsutils/debian/zfsutils.zfs.init	2010-08-06 02:21:25 UTC (rev 3138)
@@ -0,0 +1,63 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:          zfs
+# Required-Start:
+# Required-Stop: 
+# Default-Start:     S
+# Default-Stop:      0 6
+# Short-Description: Mount/umount zfs filesystems.
+# Description:
+### END INIT INFO
+
+PATH=/sbin:/bin
+
+. /lib/lsb/init-functions
+. /lib/init/vars.sh
+
+do_start() {
+	if [ "$VERBOSE" = no ]
+	then
+		log_action_begin_msg "Mounting zfs filesystems"
+		zfs mount -a
+		log_action_end_msg $?
+	else
+		log_daemon_msg "Will now mount zfs filesystems"
+		zfs mount -a
+		log_end_msg $?
+	fi
+}
+
+do_stop() {
+	if [ "$VERBOSE" = no ]
+	then
+		log_action_begin_msg "Mounting zfs filesystems"
+		zfs umount -a
+		zfs unshare -a
+		log_action_end_msg $?
+	else
+		log_daemon_msg "Will now mount zfs filesystems"
+		zfs umount -a
+		zfs unshare -a
+		log_end_msg $?
+	fi
+}
+
+
+case "$1" in
+  start|"")
+	do_start
+	;;
+  restart|reload|force-reload)
+	echo "Error: argument '$1' not supported" >&2
+	exit 3
+	;;
+  stop)
+	do_stop
+	;;
+  *)
+	echo "Usage: zfs [start|stop]" >&2
+	exit 3
+	;;
+esac
+
+:


Property changes on: trunk/zfsutils/debian/zfsutils.zfs.init
___________________________________________________________________
Added: svn:executable
   + *




More information about the Glibc-bsd-commits mailing list