systemd: add plymouth-switch-root.service

This service file is needed by systemdized dracut to ensure we properly
transition from the initrd to the root file system
This commit is contained in:
Ray Strode 2012-07-23 13:08:45 -04:00
parent 88c2e7dcf8
commit 63737f30c8
3 changed files with 20 additions and 0 deletions

View file

@ -464,6 +464,7 @@ AC_CONFIG_FILES([Makefile
systemd-units/plymouth-read-write.service
systemd-units/plymouth-reboot.service
systemd-units/plymouth-start.service
systemd-units/plymouth-switch-root.service
systemd-units/systemd-ask-password-plymouth.path
systemd-units/systemd-ask-password-plymouth.service
systemd-units/Makefile

View file

@ -1,4 +1,5 @@
systemd_unit_templates = \
plymouth-switch-root.service.in \
plymouth-start.service.in \
plymouth-read-write.service.in \
plymouth-quit.service.in \
@ -16,12 +17,16 @@ systemdunit_DATA = $(systemd_unit_templates:.in=)
install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/initrd-switch-root.target.wants\
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysinit.target.wants \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/multi-user.target.wants \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/reboot.target.wants \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/kexec.target.wants \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/poweroff.target.wants \
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/halt.target.wants
(cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/initrd-switch-root.target.wants && \
rm -f plymouth-switch-root.service && \
$(LN_S) ../plymouth-switch-root.service)
(cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysinit.target.wants && \
rm -f plymouth-start.service plymouth-read-write.service && \
$(LN_S) ../plymouth-start.service && \
@ -45,6 +50,8 @@ install-data-hook:
uninstall-hook:
rm -f \
(cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/initrd-switch-root.target.wants && \
rm -f plymouth-switch-root.service) \
(cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/sysinit.target.wants && \
rm -f plymouth-start.service plymouth-read-write.service) \
(cd $(DESTDIR)$(SYSTEMD_UNIT_DIR)/multi-user.target.wants && \

View file

@ -0,0 +1,12 @@
[Unit]
Description=Plymouth switch root service
DefaultDependencies=no
ConditionPathExists=/etc/initrd-release
Before=initrd-switch-root.service
[Service]
Type=oneshot
ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --new-root-dir=/sysroot
StandardInput=null
StandardOutput=null
StandardError=null