initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

32
dhcp/dhcp.install Normal file
View File

@@ -0,0 +1,32 @@
post_install() {
if ! getent passwd dhcp &>/dev/null; then
useradd -r -G adm -d /dev/null -s /bin/nologin dhcp >/dev/null
fi
[[ -f var/lib/dhcp/dhcpd.leases ]] || : >var/lib/dhcp/dhcpd.leases
[[ -f var/lib/dhcp/dhcpd6.leases ]] || : >var/lib/dhcp/dhcpd6.leases
if ! groups dhcp | grep adm &>/dev/null; then
gpasswd -a dhcp adm >/dev/null
fi
dhcp_shell=$(getent passwd dhcp | cut -d: -f7)
if [ "$dhcp_shell" != '/bin/nologin' ]; then
chsh -s /bin/nologin dhcp &>/dev/null
fi
}
post_upgrade() {
if (( $(vercmp $2 4.2.4.2) < 0 )); then
echo ">>> Lease directory moved from /var/state/dhcp"
echo " to /var/lib/dhcp. Move your old lease files"
echo " if you want to keep using them."
fi
post_install
}
post_remove() {
if getent passwd dhcp &>/dev/null; then
userdel dhcp >/dev/null
fi
}