From: Tollef Fog Heen Date: Sun, 26 Dec 2010 19:31:33 +0000 (+0100) Subject: Use native mount, mask services done by systemd X-Git-Tag: 16-1~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8558f7bfe9af49fd7e881de0a9aaccbfdaccff31;p=systemd Use native mount, mask services done by systemd --- diff --git a/debian/changelog b/debian/changelog index f88a4971..93e8f5d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,16 @@ systemd (15-1) experimental; urgency=low libcryptsetup dependency in a tainted build environment, as the library is currently installed in /usr/lib. * Remove autogenerated man pages and vala C sources, so they are rebuilt. + * Use native systemd mount support: + - Use MountAuto=yes and SwapAuto=yes (default) in system.conf + - Mask SysV init mount, check and cleanup scripts. + - Create an alias (symlink) for checkroot (→ remount-rootfs.service) as + synchronization point for SysV init scripts. + * Mask x11-common, rmnologin, hostname, bootmisc and bootlogd. + * Create an alias for procps (→ systemd-sysctl.service) and + urandom (→ systemd-random-seed-load.service). + * Create an alias for module-init-tools (→ systemd-modules-load.service) and + a symlink from /etc/modules-load.d/modules.conf → /etc/modules. * Install lsb-base hook which redirects calls to SysV init scripts to systemctl: /etc/init.d/ → systemctl * Install a (auto)mount unit to mount /lib/init/rw early during boot. diff --git a/debian/rules b/debian/rules index 8ce9c1e1..a9a891a6 100755 --- a/debian/rules +++ b/debian/rules @@ -18,11 +18,8 @@ override_dh_install: rm debian/tmp/usr/share/doc/systemd/LICENSE rm debian/tmp/lib/security/pam_systemd.la rm debian/tmp/lib/systemd/system/shutdown.target.wants/hwclock-save.service - rm debian/tmp/lib/systemd/system/local-fs.target.wants/remount-rootfs.service dh_install -O--parallel --fail-missing dh_install -plibpam-systemd debian/pam-configs /usr/share - sed -i 's/#\(Mount\|Swap\)Auto=yes/\1Auto=no/' debian/systemd/etc/systemd/system.conf - find ./debian/systemd/lib -name tmpwatch.\* -delete %: dh --parallel --with autoreconf $@ diff --git a/debian/systemd.links b/debian/systemd.links new file mode 100644 index 00000000..f7b2e48e --- /dev/null +++ b/debian/systemd.links @@ -0,0 +1,42 @@ +# These are all services which have native implementations +# So we mask them by linking against /dev/null or create an alias +/lib/systemd/system/systemd-random-seed-load.service /lib/systemd/system/urandom.service +/lib/systemd/system/systemd-sysctl.service /lib/systemd/system/procps.service + +/lib/systemd/system/systemd-modules-load.service /lib/systemd/system/module-init-tools.service +/etc/modules /etc/modules-load.d/modules.conf + +/dev/null /lib/systemd/system/x11-common.service +/dev/null /lib/systemd/system/hostname.service +/dev/null /lib/systemd/system/rmnologin.service +/dev/null /lib/systemd/system/bootmisc.service + +# Although bootloogd is disabled by default (via /etc/default/bootlogd) +# by masking them we avoid spawning a shell uselessly thrice during boot. +# Besides, bootlogd doesn't look particularly useful in a systemd world. +/dev/null /lib/systemd/system/bootlogd.service +/dev/null /lib/systemd/system/stop-bootlogd-single.service +/dev/null /lib/systemd/system/stop-bootlogd.service + +# TODO: make hwclock a symlink to hwclock-load.service? +# Before this can happen we need to ensure that the 85-hwclock.rules +# udev rule is not triggered when running systemd. +/dev/null /lib/systemd/system/hwclock.service +/dev/null /lib/systemd/system/hwclockfirst.service + +# We use native mount support so mask those services +# TODO: check if any sysv init script depends on those facilities +/dev/null /lib/systemd/system/mountkernfs.service +/dev/null /lib/systemd/system/mountdevsubfs.service +/dev/null /lib/systemd/system/mountall.service +/dev/null /lib/systemd/system/mountall-bootclean.service +/dev/null /lib/systemd/system/mountnfs.service +/dev/null /lib/systemd/system/mountnfs-bootclean.service +/dev/null /lib/systemd/system/checkfs.service +# We need checkroot as synchronisation point, so symlink it to remount-rootfs +/lib/systemd/system/remount-rootfs.service /lib/systemd/system/checkroot.service + +# Mount /lib/init/rw during early startup +/lib/systemd/system/lib-init-rw.automount /lib/systemd/system/local-fs.target.wants/lib-init-rw.automount + +# TODO: mtab/udev-mtab (symlink /etc/mtab to /proc/self/mounts in postinst)