1
0
This repository has been archived on 2025-01-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Anderson Luiz Alves 0464e230c1 stock 103961
2017-07-30 16:48:04 -03:00

24 lines
610 B
Bash
Executable File

#!/bin/sh
# script call by the dnsmasq DHCP server when a lease change
# environnment variables:
# DNSMASQ_INTERFACE, lan interface
# ACTION, add, old, del
# MAC, host MAC address
# IP, new host IP address
# HOST, hostname
DNSMASQ_INTERFACE="${DNSMASQ_INTERFACE:-}"
[ "$DNSMASQ_INTERFACE" = '' ] && exit 0
ACTION="${1:-}" MAC="${2:-}" IP="${3:-}" HOST="${4:-}"
. /etc/bewan/init.d/setparam
base_log "$SCRIPTD/dhcpd-call $DNSMASQ_INTERFACE $ACTION $MAC $IP $HOST" debug
# Includes the scripts located in /etc/bewan/dhcp.d
for script in `find /etc/bewan/dhcp.d -follow -type f | sort`; do
. $script
done