/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to init.d-mandos

  • Committer: Teddy Hogeborn
  • Date: 2012-06-13 22:06:57 UTC
  • mto: This revision was merged to the branch mainline in revision 596.
  • Revision ID: teddy@recompile.se-20120613220657-qvq7c7nrndl3t413
* plugins.d/mandos-client.c (get_flags): Don't clobber errno.
  (up_interface): Removed; replaced with "interface_is_up".
  (interface_is_up, interface_is_running,
   lower_privileges_permanently, take_down_interface): New.
  (bring_up_interface): Return "error_t".  Use new functions
                        "interface_is_up", "get_flags", and
                        "interface_is_running".
  (main): Save all interfaces either autodetected or specified with
          --interface in argz vector "interfaces".  Save interfaces to
          take down on exit in argz vector "interfaces_to_take_down".
          Save interface names for DEVICE variable to network hooks as
          argz_vector "interfaces_hooks".  Bug fix: Be privileged
          while stopping network hooks.
* plugins.d/mandos-client.xml (SYNOPSIS): Changed --interface synopsis.
  (DESCRIPTION): Updated to document use of all interfaces.
  (OPTIONS): Updated description of "--interface".
* network-hooks.d/bridge: Parse comma-separated DEVICE environment
                          variable.
* network-hooks.d/openvpn: - '' -
* network-hooks.d/wireless: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
### BEGIN INIT INFO
3
3
# Provides:          mandos
4
 
# Required-Start:    $remote_fs $syslog avahi-daemon
5
 
# Required-Stop:     $remote_fs $syslog avahi-daemon
 
4
# Required-Start:    $remote_fs $syslog avahi
 
5
# Required-Stop:     $remote_fs $syslog avahi
6
6
# Default-Start:     2 3 4 5
7
7
# Default-Stop:      0 1 6
8
8
# Short-Description: Mandos server
9
 
# Description:       Server of encrypted passwords to Mandos clients
 
9
# Description:       Gives encrypted passwords to Mandos clients
10
10
### END INIT INFO
11
11
 
12
12
# Author: Teddy Hogeborn <teddy@recompile.se>
23
23
NAME=mandos
24
24
DAEMON=/usr/sbin/$NAME
25
25
DAEMON_ARGS=""
26
 
if [ -d /run/. ]; then
27
 
    PIDFILE=/run/$NAME.pid
28
 
else
29
 
    PIDFILE=/var/run/$NAME.pid
30
 
fi
 
26
PIDFILE=/var/run/$NAME.pid
31
27
SCRIPTNAME=/etc/init.d/$NAME
32
28
 
33
29
# Exit if the package is not installed
44
40
. /lib/init/vars.sh
45
41
 
46
42
# Define LSB log_* functions.
47
 
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
48
 
# and status_of_proc is working.
 
43
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
49
44
. /lib/lsb/init-functions
50
45
 
51
46
#
123
118
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
124
119
        esac
125
120
        ;;
126
 
  status)
127
 
        status_of_proc "$DAEMON" "$NAME" -p "$PIDFILE" && exit 0 || exit $?
128
 
        ;;
129
121
  #reload|force-reload)
130
122
        #
131
123
        # If do_reload() is not implemented then leave this commented out
152
144
                esac
153
145
                ;;
154
146
          *)
155
 
                # Failed to stop
 
147
                # Failed to stop
156
148
                log_end_msg 1
157
149
                ;;
158
150
        esac
159
151
        ;;
 
152
  status)
 
153
        status_of_proc "$DAEMON" "$NAME" -p "$PIDFILE"
 
154
        ;;
160
155
  *)
161
156
        #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
162
 
        echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
 
157
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
163
158
        exit 3
164
159
        ;;
165
160
esac