Browse Source

Make psd and dhcpcd configureable

rocket-config
mid-kid 7 years ago
parent
commit
9ece4610e0
  1. 2
      etc/default/dhcpcd
  2. 5
      etc/default/psd
  3. 15
      etc/rc.d/rc.dhcpcd
  4. 3
      etc/rc.d/rc.psd

2
etc/default/dhcpcd

@ -0,0 +1,2 @@
# Specify for which interfaces you want dhcpcd to run
#IFACES=""

5
etc/default/psd

@ -0,0 +1,5 @@
# Users for which psd should be enabled
#USERS=""
# If $USERS is empty, scan for users that run psd and store them in this file.
#USERS_CACHE="/run/psd-users.cache"

15
etc/rc.d/rc.dhcpcd

@ -4,15 +4,22 @@
#
# Start/stop the DHCP daemon.
#
# This script doesn't do anything other than starting dhcpcp for all interfaces. For more functionality see rc.inet1.
# This script doesn't do anything other than starting dhcpcp for the specified interfaces (or all of them). For more functionality see rc.inet1.
IFACES=""
if [ -f /etc/default/dhcpcd ]; then
. /etc/default/dhcpcd
fi
case "$1" in
'start')
dhcpcd -b
shift
dhcpcd -b ${@:-$IFACES}
;;
'stop')
dhcpcd -k
shift
dhcpcd -k ${@:-$IFACES}
;;
*)
echo "Usage: $0 start|stop"
echo "Usage: $0 start|stop [interfaces]"
esac

3
etc/rc.d/rc.psd

@ -10,6 +10,9 @@
USERS=""
USERS_CACHE="/run/psd-users.cache"
if [ -f /etc/default/psd ]; then
. /etc/default/psd
fi
scan_users() {
rm -f "$USERS_CACHE"

Loading…
Cancel
Save