Changeset 1534 for trunk/packages/invirt-remote-server
- Timestamp:
- Nov 5, 2008, 8:00:52 PM (16 years ago)
- Location:
- trunk/packages/invirt-remote-server/debian
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-remote-server/debian/changelog
r1411 r1534 1 invirt-remote-server (0.0.12) unstable; urgency=low 2 3 * shorten initscript with std-init, correct the usage message 4 5 -- Greg Price <price@mit.edu> Wed, 5 Nov 2008 19:59:18 -0400 6 1 7 invirt-remote-server (0.0.11) unstable; urgency=low 2 8 -
trunk/packages/invirt-remote-server/debian/invirt-remote-server.init
r1224 r1534 12 12 # Author: Invirt project <invirt@mit.edu> 13 13 14 # Do NOT "set -e"15 16 # PATH should only include /usr/* if it runs after the mountnfs.sh script17 14 PATH=/sbin:/usr/sbin:/bin:/usr/bin 15 NAME=invirt-remote-server 18 16 DESC="the Invirt remctl configuration filesystem" 19 NAME=invirt-remconffs20 17 DAEMON=/usr/sbin/invirt-remconffs 21 18 DAEMON_ARGS="/etc/remctl/remconffs" 22 19 PIDFILE=/var/run/$NAME.pid 23 20 SCRIPTNAME=/etc/init.d/$NAME 21 GEN_FILES=/etc/remctl/acl/web 24 22 25 23 # Exit if the package is not installed 26 24 [ -x "$DAEMON" ] || exit 0 27 25 28 # Read configuration variable file if it is present 29 [ -r /etc/default/$NAME ] && . /etc/default/$NAME 26 . /lib/init/gen-files.sh 27 . /lib/init/std-init.sh 30 28 31 # Load the VERBOSE setting and other rcS variables32 . /lib/init/vars.sh33 34 # Define LSB log_* functions.35 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.36 . /lib/lsb/init-functions37 38 gen_config()39 {40 for i in /etc/remctl/acl/web; do41 mako-render $i.mako > $i42 done43 }44 45 #46 # Function that starts the daemon/service47 #48 29 do_start() 49 30 { … … 52 33 # 1 if daemon was already running 53 34 # 2 if daemon could not be started 54 gen_ config35 gen_files 55 36 modprobe fuse 56 37 daemon --running -n $NAME && return 1 … … 58 39 } 59 40 60 #61 # Function that stops the daemon/service62 #63 41 do_stop() 64 42 { … … 77 55 } 78 56 79 case "$1" in 80 start) 81 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" 82 do_start 83 case "$?" in 84 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 85 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 86 esac 87 ;; 88 stop) 89 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" 90 do_stop 91 case "$?" in 92 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 93 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 94 esac 95 ;; 96 #reload|force-reload) 97 # 98 # If do_reload() is not implemented then leave this commented out 99 # and leave 'force-reload' as an alias for 'restart'. 100 # 101 #log_daemon_msg "Reloading $DESC" "$NAME" 102 #do_reload 103 #log_end_msg $? 104 #;; 105 restart|force-reload) 106 # 107 # If the "reload" option is implemented then remove the 108 # 'force-reload' alias 109 # 110 log_daemon_msg "Restarting $DESC" "$NAME" 111 do_stop 112 case "$?" in 113 0|1) 114 do_start 115 case "$?" in 116 0) log_end_msg 0 ;; 117 1) log_end_msg 1 ;; # Old process is still running 118 *) log_end_msg 1 ;; # Failed to start 119 esac 120 ;; 121 *) 122 # Failed to stop 123 log_end_msg 1 124 ;; 125 esac 126 ;; 127 *) 128 #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 129 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 130 exit 3 131 ;; 132 esac 133 134 : 57 std_init "$1"
Note: See TracChangeset
for help on using the changeset viewer.