Changeset 1198
- Timestamp:
- Oct 24, 2008, 3:35:35 AM (16 years ago)
- Location:
- trunk/packages/invirt-console-host/debian
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-console-host/debian/changelog
r1187 r1198 1 invirt-console-host (0.0.2) unstable; urgency=low 2 3 * make initscript start conserver on start/restart, not just reload 4 * drastically shorten initscript to current Invirt best practice, 5 in hopes that such dumb bugs can't hide so easily 6 7 -- Greg Price <price@mit.edu> Fri, 24 Oct 2008 03:33:32 -0400 8 1 9 invirt-console-host (0.0.1) unstable; urgency=low 2 10 -
trunk/packages/invirt-console-host/debian/invirt-console-host.init
r1187 r1198 6 6 # Default-Start: 2 3 4 5 7 7 # Default-Stop: 0 1 6 8 # Short-Description: conserver config from invirt config for invirt host8 # Short-Description: conserver config from invirt-config for Invirt host 9 9 # Description: 10 10 ### END INIT INFO 11 11 12 # Author: Invirt/XVM Project, MIT SIPB <invirt@mit.edu> 12 PACKAGE=invirt-console-host 13 PARENTPACKAGE=conserver-server 13 14 14 # Do NOT "set -e" 15 dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0 15 16 16 # PATH should only include /usr/* if it runs after the mountnfs.sh script17 PATH=/sbin:/usr/sbin:/bin:/usr/bin18 DESC="Invirt host console config"19 NAME=invirt-console-host20 SCRIPTNAME=/etc/init.d/$NAME21 22 # Read configuration variable file if it is present23 [ -r /etc/default/$NAME ] && . /etc/default/$NAME24 25 # Load the VERBOSE setting and other rcS variables26 17 . /lib/init/vars.sh 27 28 # Define LSB log_* functions.29 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.30 18 . /lib/lsb/init-functions 31 19 … … 37 25 } 38 26 39 #40 # Function that starts the daemon/service41 #42 do_start()43 {44 # Return45 # 0 if daemon has been started46 # 1 if daemon was already running47 # 2 if daemon could not be started48 gen_config49 VERBOSE=no /etc/init.d/conserver-server reload50 }51 52 #53 # Function that stops the daemon/service54 #55 do_stop()56 {57 return 158 }59 60 do_reload()61 {62 gen_config63 VERBOSE=no /etc/init.d/conserver-server reload64 }65 66 27 case "$1" in 67 start) 68 [ "$VERBOSE" != no ] && log_begin_msg "Starting $DESC" "$NAME" 69 do_start 70 case "$?" in 71 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 72 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 73 esac 74 ;; 28 start|reload|force-reload|restart) 29 log_begin_msg "Reloading config for $PACKAGE" 30 gen_config 31 log_end_msg $? 32 /etc/init.d/"$PARENTPACKAGE" "$1" 33 ;; 75 34 stop) 76 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" 77 do_stop 78 case "$?" in 79 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 80 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 81 esac 82 ;; 83 reload|force-reload) 84 log_daemon_msg "Reloading $DESC" "$NAME" 85 do_reload 86 log_end_msg $? 87 ;; 88 restart) 89 log_daemon_msg "Restarting $DESC" "$NAME" 90 do_stop 91 case "$?" in 92 0|1) 93 do_start 94 case "$?" in 95 0) log_end_msg 0 ;; 96 1) log_end_msg 1 ;; # Old process is still running 97 *) log_end_msg 1 ;; # Failed to start 98 esac 99 ;; 100 *) 101 # Failed to stop 102 log_end_msg 1 103 ;; 104 esac 105 ;; 35 /etc/init.d/"$PARENTPACKAGE" "$1" 36 ;; 106 37 *) 107 echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 108 exit 3 109 ;; 38 log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}" 39 ;; 110 40 esac 111 112 :
Note: See TracChangeset
for help on using the changeset viewer.