Merge "DHCP: make udev rules want dhcp-interface@.service"
This commit is contained in:
commit
593680e936
@ -9,5 +9,6 @@ DIB_INIT_SYSTEM=$(dib-init-system)
|
|||||||
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf
|
||||||
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
||||||
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service
|
||||||
install -D -g root -o root -m 0644 ${SCRIPTDIR}/udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
||||||
fi
|
fi
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=DHCP interface %I
|
||||||
|
After=network.service network.target
|
||||||
|
|
||||||
|
ConditionPathExists=!/etc/sysconfig/network-scripts/ifcfg-%I
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
User=root
|
||||||
|
ExecStartPre=/usr/local/sbin/dhcp-all-interfaces.sh %I
|
||||||
|
ExecStart=/sbin/ifup %I
|
||||||
|
RemainAfterExit=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -1 +1 @@
|
|||||||
SUBSYSTEM=="net", ACTION=="add", RUN+="/usr/local/sbin/dhcp-all-interfaces.sh $name", RUN+="/sbin/ifup $name"
|
SUBSYSTEM=="net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="dhcp-interface@$name.service"
|
||||||
|
Loading…
Reference in New Issue
Block a user