Changeset 699


Ignore:
Timestamp:
Jul 21, 2008, 6:30:55 PM (16 years ago)
Author:
price
Message:

generate console config from /etc/invirt/* at start/reload

Location:
trunk/packages/sipb-xen-console/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-console/debian/changelog

    r697 r699  
     1sipb-xen-console (7.5) unstable; urgency=low
     2
     3  * Generate config at start/reload from /etc/invirt/*.
     4
     5 -- Greg Price <price@mit.edu>  Mon, 21 Jul 2008 18:29:43 -0400
     6
    17sipb-xen-console (7.4) unstable; urgency=low
    28
  • trunk/packages/sipb-xen-console/debian/sipb-xen-console.init

    r380 r699  
    1616# PATH should only include /usr/* if it runs after the mountnfs.sh script
    1717PATH=/sbin:/usr/sbin:/bin:/usr/bin
    18 DESC="The sipb-xen console server homedir filesystem"
     18DESC="The sipb-xen console server"
    1919NAME=sipb-xen-console
    2020DAEMON=/usr/bin/sipb-xen-consolefs
     
    3636. /lib/lsb/init-functions
    3737
     38gen_config()
     39{
     40        perl -pe 's|^|#include /etc/conserver/conf.d/|' \
     41            </etc/invirt/hosts >/etc/conserver/invirt-hosts.cf
     42        INVIRT_REALM="$(cat /etc/invirt/realm)"
     43        perl -pe "s|^|host/|; s|\$|\@$INVIRT_REALM|" \
     44            </etc/invirt/hosts >/etc/remctl/acl/invirt-console
     45}
     46
    3847#
    3948# Function that starts the daemon/service
     
    4655        #   2 if daemon could not be started
    4756        modprobe fuse
     57        gen_config
    4858        daemon --running -n $NAME && return 1
    4959        daemon -r -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
     
    6979}
    7080
     81do_reload()
     82{
     83        gen_config
     84        /etc/init.d/conserver-server reload
     85}
     86
    7187case "$1" in
    7288  start)
     
    86102        esac
    87103        ;;
    88   #reload|force-reload)
    89         #
    90         # If do_reload() is not implemented then leave this commented out
    91         # and leave 'force-reload' as an alias for 'restart'.
    92         #
    93         #log_daemon_msg "Reloading $DESC" "$NAME"
    94         #do_reload
    95         #log_end_msg $?
    96         #;;
    97   restart|force-reload)
    98         #
    99         # If the "reload" option is implemented then remove the
    100         # 'force-reload' alias
    101         #
     104  reload|force-reload)
     105        log_daemon_msg "Reloading $DESC" "$NAME"
     106        do_reload
     107        log_end_msg $?
     108        ;;
     109  restart)
    102110        log_daemon_msg "Restarting $DESC" "$NAME"
    103111        do_stop
     
    118126        ;;
    119127  *)
    120         #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    121         echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
     128        echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    122129        exit 3
    123130        ;;
Note: See TracChangeset for help on using the changeset viewer.