From 70623600744cab314baf1ccc912134456ffe565d Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 7 Feb 2024 10:57:17 +0100 Subject: add ifplugd config --- rootfs/etc/ifplugd/ifplugd.action | 9 +++++++++ rootfs/etc/ifplugd/ifplugd.conf | 6 ++++++ rootfs/etc/init.d/rcS | 11 ++++++++--- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100755 rootfs/etc/ifplugd/ifplugd.action create mode 100644 rootfs/etc/ifplugd/ifplugd.conf (limited to 'rootfs') diff --git a/rootfs/etc/ifplugd/ifplugd.action b/rootfs/etc/ifplugd/ifplugd.action new file mode 100755 index 0000000..05db65d --- /dev/null +++ b/rootfs/etc/ifplugd/ifplugd.action @@ -0,0 +1,9 @@ +#!/bin/sh -e +INTERFACE="$1" +NEW_STATE="$2" + +test -n "$INTERFACE" +test -n "$NEW_STATE" + +[ "$NEW_STATE" = "up" ] && exec ifup "$INTERFACE" +[ "$NEW_STATE" = "down" ] && exec ifdown "$INTERFACE" diff --git a/rootfs/etc/ifplugd/ifplugd.conf b/rootfs/etc/ifplugd/ifplugd.conf new file mode 100644 index 0000000..416a0e4 --- /dev/null +++ b/rootfs/etc/ifplugd/ifplugd.conf @@ -0,0 +1,6 @@ +#!/bin/sh +# ifplugd configuration file +INTERFACES="eth0" +# ifplugd options (see ifplugd -h) +ARGS="-u0 -d3" + diff --git a/rootfs/etc/init.d/rcS b/rootfs/etc/init.d/rcS index 59e0fe0..b819ce4 100755 --- a/rootfs/etc/init.d/rcS +++ b/rootfs/etc/init.d/rcS @@ -1,4 +1,9 @@ #!/bin/sh -mount -a -hostname -F /etc/hostname -syslogd +# core +mount -a # mount all drives in /etc/fstab +hostname -F /etc/hostname # update hostname + +# system services +syslogd # system log +ifplugd # automatically link hot-plugged ethernet connections + -- cgit v1.2.3