Rename generate-interfaces-file.sh...
Rename generate-interfaces-file.sh to dhcp-all-interfaces.sh so that it is easier to find/remember in the $PATH on a deployed image. Also, on some distros the script actually generates many files so the previous name was a bit confusing. Change-Id: I7152fa7c28e8ade251311da2cd5f75972423b66c
This commit is contained in:
parent
f58f859303
commit
5da1f1324b
@ -6,6 +6,6 @@ to know ahead of time which one is which, so we will simply run a
|
|||||||
DHCP client on all interfaces with real MAC addresses (except lo) that
|
DHCP client on all interfaces with real MAC addresses (except lo) that
|
||||||
are visible on the first boot.
|
are visible on the first boot.
|
||||||
|
|
||||||
The script /usr/local/sbin/generate-interfaces-file.sh will be called
|
The script /usr/local/sbin/dhcp-all-interfaces.sh will be called
|
||||||
early in each boot and will scan available network interfaces and
|
early in each boot and will scan available network interfaces and
|
||||||
ensure they are configured properly before networking services are started.
|
ensure they are configured properly before networking services are started.
|
||||||
|
@ -3,7 +3,7 @@ set -x
|
|||||||
|
|
||||||
SCRIPTDIR=$(dirname $0)
|
SCRIPTDIR=$(dirname $0)
|
||||||
|
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/generate-interfaces-file.sh /usr/local/sbin/generate-interfaces-file.sh
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh
|
||||||
|
|
||||||
DIB_INIT_SYSTEM=$(dib-init-system)
|
DIB_INIT_SYSTEM=$(dib-init-system)
|
||||||
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Call a script to generate an /etc/network/interfaces file to DHCP all available interfaces
|
# Call a script to generate a /etc/network/interfaces file to DHCP all available interfaces
|
||||||
# Then remove this config file so the script is never run again
|
# Then remove this config file so the script is never run again
|
||||||
|
|
||||||
description "DHCP any connected, but unconfigured network interfaces"
|
description "DHCP any connected, but unconfigured network interfaces"
|
||||||
@ -8,4 +8,4 @@ instance $INTERFACE
|
|||||||
|
|
||||||
task
|
task
|
||||||
|
|
||||||
exec /usr/local/sbin/generate-interfaces-file.sh
|
exec /usr/local/sbin/dhcp-all-interfaces.sh
|
||||||
|
@ -6,7 +6,7 @@ Before=network.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/local/sbin/generate-interfaces-file.sh
|
ExecStart=/usr/local/sbin/dhcp-all-interfaces.sh
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
Loading…
Reference in New Issue
Block a user