-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from garlick/old_prs
systemd: allow group to be configured and set SHELL in env; add UBNT edge device
- Loading branch information
Showing
5 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Control POE on UniFi switches via rancid (http://www.shrubbery.net/rancid/) | ||
# | ||
# device "ubnt-switch" "rancid-ubnt-poe" "/usr/lib/rancid/bin/clogin -t600 myswitch |&" | ||
# | ||
# Plug names are the device interface name: | ||
# node "mydevice" "ubnt-switch" "0/1" | ||
# | ||
# The user running the powerman must have a .cloginrc file in its home directory | ||
# with an appropriate configuration to allow querying and setting power status | ||
# | ||
specification "rancid-ubnt-poe" { | ||
timeout 10 | ||
|
||
script login { | ||
expect ".*#" | ||
} | ||
script logout { | ||
send "exit\n" | ||
} | ||
script status { | ||
send "show poe status %s | section (Good|Circuit|Short|Low) \n" | ||
expect "\r\n\r\n([^ ]+) +(Good|Open Circuit|Short|R Sig Too Low)" | ||
setplugstate $1 $2 on="Good" off=".*" | ||
expect ".*#" | ||
} | ||
script on { | ||
send "configure\n" | ||
expect ".*\\(Config\\)#" | ||
send "interface %s\n" | ||
expect ".*\\(Interface [0-9\/]+\\)#" | ||
send "poe opmode auto\n" | ||
expect ".*\\(Interface [0-9\/]+\\)#" | ||
send "end\n" | ||
expect ".*#" | ||
} | ||
script off { | ||
send "configure\n" | ||
expect ".*\\(Config\\)#" | ||
send "interface %s\n" | ||
expect ".*\\(Interface [0-9\/]+\\)#" | ||
send "poe opmode shutdown\n" | ||
expect ".*\\(Interface [0-9\/]+\\)#" | ||
send "end\n" | ||
expect ".*#" | ||
} | ||
script cycle { | ||
send "configure\n" | ||
expect ".*\\(Config\\)#" | ||
send "interface %s\n" | ||
expect ".*\\(Interface [0-9\/]+\\)#" | ||
send "poe opmode shutdown poe opmode auto\n" | ||
expect ".*\\(Interface [0-9\/]+\\)#" | ||
send "end\n" | ||
expect ".*#" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters