adding
This commit is contained in:
parent
cb7af1b686
commit
2f7aaafce0
6 changed files with 1019 additions and 0 deletions
37
petrified.dispatch
Normal file
37
petrified.dispatch
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue