Commit c746e2ad authored by Marco d'Itri's avatar Marco d'Itri
Browse files

Copy the temporary rules from /run/ to /etc/

They are created by write_net_rules in early boot and need to be copied
to the root file system once it has been remounted read/write.
parent 2493e4e8
......@@ -51,6 +51,8 @@ systemd (204-9) UNRELEASED; urgency=medium
devices installed. Since the common case is having a single device
then everything will work out just fine most of the times...
(Closes: #655924)
* Fix write_net_rules for systemd and sysvinit users by copying the
temporary rules from /run/udev/ to /etc/udev/. (Closes: #735563)
[ Michael Stapelberg ]
* Add systemd-dbg package, thanks Daniel Schaal (Closes: #742724).
......
#!/bin/sh -e
# Copy any rules generated while the root filesystem was read-only
for file in /run/udev/tmp-rules--*; do
[ -e "$file" ] || continue
cat "$file" >> "/etc/udev/rules.d/${file##*tmp-rules--}"
rm -f "$file"
done
[Unit]
Description=Copy rules generated while the root was ro
DefaultDependencies=no
After=systemd-udevd.service systemd-udev-settle.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/udev/udev-finish
......@@ -127,6 +127,7 @@ override_dh_install:
debian/extra/dsl-modem.agent \
debian/extra/logger.agent \
debian/extra/net.agent \
debian/extra/udev-finish \
debian/extra/write_net_rules \
debian/udev/lib/udev/
# systemd
......@@ -138,6 +139,9 @@ override_dh_install:
install --mode=644 debian/debian-fixup.service debian/ifup@.service \
debian/units/run-lock.mount debian/units/run-user.mount \
debian/systemd/lib/systemd/system/
install --mode=644 debian/extra/udev-finish.service \
debian/udev/lib/systemd/system/
ln -s ../udev-finish.service debian/udev/lib/systemd/system/sysinit.target.wants/
install --mode=755 debian/debian-fixup \
debian/systemd/lib/systemd/
install --mode=755 debian/systemd-logind-launch \
......
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: udev-finish
# Required-Start: udev $local_fs
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Copy rules generated while the root was ro
### END INIT INFO
PATH="/sbin:/bin"
case "$1" in
start) ;;
stop|restart|force-reload) exit 0 ;;
*) echo "Usage: $0 {start|stop|restart|force-reload}" >&2; exit 1 ;;
esac
exec /lib/udev/udev-finish
......@@ -21,10 +21,5 @@ script
fi
# Copy any rules generated while the root filesystem was read-only
for file in /run/tmp-rules--*
do
[ -e "$file" ] || continue
cat "$file" >> "/etc/udev/rules.d/${file##*tmp-rules--}"
rm -f "$file"
done
/lib/udev/udev-finish
end script
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment