/mandos/release

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

« back to all changes in this revision

Viewing changes to network-hooks.d/openvpn

  • Committer: Teddy Hogeborn
  • Date: 2011-12-30 17:57:46 UTC
  • mto: (237.7.89 trunk)
  • mto: This revision was merged to the branch mainline in revision 290.
  • Revision ID: teddy@recompile.se-20111230175746-qz41pq522ljm0vw9
* network-hooks.d/wireless (start): Bug fixes: Don't shadow "$DELAY".
                                    Supress unwanted error messages.
  (modules): Bug fix: Parse new config file syntax.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
CONFIG="openvpn.conf"
17
17
 
18
18
# Extract the "dev" setting from the config file
19
 
VPNDEVICE=`sed -n -e 's/[[:space:]]#.*//' \
20
 
    -e 's/^[[:space:]]*dev[[:space:]]\+//p' \
21
 
    "$MANDOSNETHOOKDIR/$CONFIG"`
 
19
VPNDEVICE="`sed -n -e 's/#.*//' -e 's/^[[:space:]]*dev[[:space:]]\+//p' \"$MANDOSNETHOOKDIR/$CONFIG\"`"
22
20
 
23
21
PIDFILE=/run/openvpn-mandos.pid
24
22
 
36
34
 
37
35
case "$1" in
38
36
    start)
39
 
        "$openvpn" --cd "$MANDOSNETHOOKDIR" \
40
 
            --daemon 'openvpn(Mandos)' --writepid "$PIDFILE" \
41
 
            --config "$CONFIG"
 
37
        "$openvpn" --cd "$MANDOSNETHOOKDIR" --daemon 'openvpn(Mandos)' --writepid "$PIDFILE" --config "$CONFIG"
42
38
        sleep "$DELAY"
43
39
        ;;
44
40
    stop)