This commit is contained in:
tengel 2014-09-07 17:21:40 -05:00
parent 1cfa830983
commit 62370b823b
6 changed files with 1019 additions and 0 deletions

37
petrified.dispatch Normal file
View file

@ -0,0 +1,37 @@
#!/bin/bash
#
# This is a NetworkManager dispatcher hook for petrified. This file should
# be copied to /etc/NetworkManager/dispatcher.d/10-petrified and set to
# mode 0755, permissions root:root
# Arguments - see networkmanager(8)
INTERFACE=$1
STATUS=$2
# Command to run
PETCMD=/usr/bin/petrified
# Run any time a network status has changed, basically; this could be
# easily customized to use a particular config for an exact interface
# using the '-c <config>' parameter.
case "$STATUS" in
up)
${PETCMD}
;;
vpn-up)
${PETCMD}
;;
down)
${PETCMD}
;;
vpn-down)
${PETCMD}
;;
dhcp4-change)
${PETCMD}
;;
dhcp6-change)
${PETCMD}
;;
esac