Changeset 1507 for trunk/packages/xvm-iscsi-config
- Timestamp:
- Nov 1, 2008, 12:28:57 PM (16 years ago)
- Location:
- trunk/packages/xvm-iscsi-config/debian
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/xvm-iscsi-config/debian/copyright
r1496 r1507 1 This package was created for the XVM project <xvm@mit.edu> of the MIT 2 Student Information Processing Board. 1 This software was written as part of the Invirt project <invirt@mit.edu>. 3 2 4 You may use it, etc, under the GNU GPL, version 2 or later. 3 Copyright : 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 On Debian systems, the complete text of the GNU General Public License 16 can be found in the file /usr/share/common-licenses/GPL. -
trunk/packages/xvm-iscsi-config/debian/xvm-iscsi-config.init
r1496 r1507 12 12 # Author: SIPB XVM Project <xvm@mit.edu> 13 13 14 # Do NOT "set -e" 15 16 # PATH should only include /usr/* if it runs after the mountnfs.sh script 14 NAME=xvm-iscsi-config 15 DESC="Re-generate the iSCSI config" 17 16 PATH=/sbin:/usr/sbin:/bin:/usr/bin 18 DESC="Re-generate the iSCSI config" 19 NAME=xvm-iscsi-config 17 GEN_FILES=/etc/iscsi/iscsid.conf.xvm 20 18 21 19 # Read configuration variable file if it is present 22 20 [ -r /etc/default/$NAME ] && . /etc/default/$NAME 23 21 24 # Load the VERBOSE setting and other rcS variables 25 . /lib/init/vars.sh 22 . /lib/init/config-init.sh 26 23 27 # Define LSB log_* functions. 28 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. 29 . /lib/lsb/init-functions 30 31 # 32 # Function that starts the daemon/service 33 # 34 do_start() 35 { 36 # Return 37 # 0 if daemon has been started 38 # 1 if daemon was already running 39 # 2 if daemon could not be started 40 for i in /etc/iscsi/iscsid.conf.xvm 41 do mako-render $i.mako > $i 42 done 43 } 44 45 # 46 # Function that stops the daemon/service 47 # 48 do_stop() 49 { 50 # Return 51 # 0 if daemon has been stopped 52 # 1 if daemon was already stopped 53 # 2 if daemon could not be stopped 54 # other if a failure occurred 55 return 0 56 } 57 58 case "$1" in 59 start) 60 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" 61 do_start 62 case "$?" in 63 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 64 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 65 esac 66 ;; 67 stop) 68 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" 69 do_stop 70 case "$?" in 71 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 72 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; 73 esac 74 ;; 75 restart|force-reload) 76 log_daemon_msg "Restarting $DESC" "$NAME" 77 do_stop 78 case "$?" in 79 0|1) 80 do_start 81 case "$?" in 82 0) log_end_msg 0 ;; 83 1) log_end_msg 1 ;; # Old process is still running 84 *) log_end_msg 1 ;; # Failed to start 85 esac 86 ;; 87 *) 88 # Failed to stop 89 log_end_msg 1 90 ;; 91 esac 92 ;; 93 *) 94 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 95 exit 3 96 ;; 97 esac 98 99 : 24 config_init "$1"
Note: See TracChangeset
for help on using the changeset viewer.