-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inititial Commit
- Loading branch information
Showing
6 changed files
with
523 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: vyatta-cfg-dhcp-server.patch | ||
Version: 1.0-2 | ||
Section: base | ||
Priority: optional | ||
Architecture: all | ||
Depends: vyatta-cfg-dhcp-server | ||
Maintainer: Steven Myers <[email protected]> | ||
Description: Patch dnsmasq with optional static lease file | ||
|
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,4 @@ | ||
#!/bin/bash | ||
chksrv="systemctl is-active --quiet dnsmasq" | ||
if $chksrv; then exit 1; else systemctl start dnsmasq; fi | ||
exit 0 |
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,3 @@ | ||
#!/bin/bash | ||
file="/opt/vyatta/sbin/dnsmasq-dhcp-config.pl" | ||
dpkg-divert --remove --package vyatta-cfg-dhcp-server.patch --rename $file |
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,18 @@ | ||
#!/bin/bash | ||
# vyatta-cfg-dhcp-server.patch | ||
# Checks for valid check sum and proceeds with install | ||
file="/opt/vyatta/sbin/dnsmasq-dhcp-config.pl" | ||
fileold="/opt/vyatta/sbin/dnsmasq-dhcp-config.pl.old" | ||
sum="dae0b9fa8b6e0f52712746830a2029cb" | ||
chksrv="systemctl is-active --quiet dnsmasq" | ||
md5=($(md5sum $file)) | ||
[ ! -f "$file" ] && exit 1 | ||
if [ $md5 == $sum ]; then | ||
if $chksrv; then systemctl stop dnsmasq; fi | ||
dpkg-divert --add --package vyatta-cfg-dhcp-server.patch --rename --divert $fileold $file | ||
echo "ok" | ||
exit 0 | ||
else | ||
echo "no file" | ||
exit 1 | ||
fi |
Oops, something went wrong.