[packages/systemd] - drop pld-storage-init in favor of services provided by respective packages

baggins baggins at pld-linux.org
Sat Feb 25 13:17:51 CET 2017


commit 77352d2005e7eaf50a6f89761a29da07b115ccd8
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Feb 25 12:18:04 2017 +0100

    - drop pld-storage-init in favor of services provided by respective packages

 pld-storage-init-late.service | 14 --------------
 pld-storage-init.service      | 14 --------------
 pld-storage-init.sh           | 41 -----------------------------------------
 pld-wait-storage.service      | 18 ------------------
 systemd.spec                  | 26 ++++++--------------------
 5 files changed, 6 insertions(+), 107 deletions(-)
---
diff --git a/systemd.spec b/systemd.spec
index 3438896..f172d41 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -37,10 +37,6 @@ Source2:	%{name}_booted.c
 Source3:	network.service
 Source4:	var-lock.mount
 Source5:	var-run.mount
-Source10:	pld-storage-init-late.service
-Source11:	pld-storage-init.service
-Source12:	pld-wait-storage.service
-Source13:	pld-storage-init.sh
 Source14:	pld-clean-tmp.service
 Source15:	pld-clean-tmp.sh
 Source16:	pld-rc-inetd-generator.sh
@@ -168,6 +164,9 @@ Provides:	user(systemd-timesync)
 #Obsoletes:	ConsoleKit-x11
 Obsoletes:	systemd-no-compat-tmpfiles
 Obsoletes:	udev-systemd
+# for storage detection / activation services
+Conflicts:	dmraid < 1.0.0-0.rc16.3.3
+Conflicts:	mdadm < 4.0-2
 # sytemd wants pam with pam_systemd.so in system-auth...
 Conflicts:	pam < 1:1.1.5-5
 # ...and sudo hates it
@@ -175,8 +174,8 @@ Conflicts:	sudo < 1:1.7.8p2-4
 # for prefdm script
 Conflicts:	xinitrc-ng < 1.0
 # systemd scripts use options not present in older versions
-Conflicts:	kpartx < 0.4.9-7
-Conflicts:	multipath-tools < 0.4.9-7
+Conflicts:	kpartx < 0.6.1-1
+Conflicts:	multipath-tools < 0.6.1-1
 # no tmpfs on /media, use /run/media/$USER for mounting
 Conflicts:	udisks2 < 1.92.0
 # packages that have dirs under /var/run and/or /var/lock must provide tmpfiles configs
@@ -759,16 +758,9 @@ ln -s ../var-run.mount $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
 # and remove mounting tmp on tmpfs by default
 %{__rm} $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants/tmp.mount
 
-# Install and enable storage subsystems support services (RAID, LVM, etc.)
-cp -p %{SOURCE10} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init-late.service
-cp -p %{SOURCE11} $RPM_BUILD_ROOT%{systemdunitdir}/pld-storage-init.service
-cp -p %{SOURCE12} $RPM_BUILD_ROOT%{systemdunitdir}/pld-wait-storage.service
+# add /tmp cleanup service
 cp -p %{SOURCE14} $RPM_BUILD_ROOT%{systemdunitdir}/pld-clean-tmp.service
-install -p %{SOURCE13} $RPM_BUILD_ROOT/lib/systemd/pld-storage-init
 install -p %{SOURCE15} $RPM_BUILD_ROOT/lib/systemd/pld-clean-tmp
-
-ln -s ../pld-storage-init-late.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
-ln -s ../pld-storage-init.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
 ln -s ../pld-clean-tmp.service $RPM_BUILD_ROOT%{systemdunitdir}/local-fs.target.wants
 
 # Add inside container only SIGPWR handler which is used by lxc-stop
@@ -1112,7 +1104,6 @@ fi
 /lib/systemd/resolv.conf
 %attr(755,root,root) /lib/systemd/libsystemd-shared*.so
 %attr(755,root,root) /lib/systemd/pld-clean-tmp
-%attr(755,root,root) /lib/systemd/pld-storage-init
 %attr(755,root,root) /lib/systemd/systemd-ac-power
 %attr(755,root,root) /lib/systemd/systemd-backlight
 %attr(755,root,root) /lib/systemd/systemd-binfmt
@@ -1501,9 +1492,6 @@ fi
 %{systemdunitdir}/netfs.service
 %{systemdunitdir}/network.service
 %{systemdunitdir}/pld-clean-tmp.service
-%{systemdunitdir}/pld-storage-init-late.service
-%{systemdunitdir}/pld-storage-init.service
-%{systemdunitdir}/pld-wait-storage.service
 %{systemdunitdir}/prefdm.service
 %{systemdunitdir}/quotaon.service
 %{systemdunitdir}/random.service
@@ -1667,8 +1655,6 @@ fi
 %{systemdunitdir}/graphical.target.wants/display-manager.service
 %{systemdunitdir}/graphical.target.wants/systemd-update-utmp-runlevel.service
 %{systemdunitdir}/local-fs.target.wants/pld-clean-tmp.service
-%{systemdunitdir}/local-fs.target.wants/pld-storage-init-late.service
-%{systemdunitdir}/local-fs.target.wants/pld-storage-init.service
 %{systemdunitdir}/local-fs.target.wants/systemd-remount-fs.service
 %{systemdunitdir}/local-fs.target.wants/var-lib-machines.mount
 %{systemdunitdir}/local-fs.target.wants/var-lock.mount
diff --git a/pld-storage-init-late.service b/pld-storage-init-late.service
deleted file mode 100644
index 692c816..0000000
--- a/pld-storage-init-late.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Initialize storage subsystems (RAID, LVM, etc.)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=cryptsetup.target pld-storage-init.service
-Before=local-fs.target shutdown.target
-Wants=pld-wait-storage.service
-ConditionVirtualization=!container
-
-[Service]
-ExecStart=/lib/systemd/pld-storage-init
-Type=oneshot
-TimeoutSec=0
-RemainAfterExit=yes
diff --git a/pld-storage-init.service b/pld-storage-init.service
deleted file mode 100644
index 40c57e4..0000000
--- a/pld-storage-init.service
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Initialize storage subsystems (RAID, LVM, etc.)
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=pld-wait-storage.service
-Before=local-fs.target shutdown.target
-Wants=pld-wait-storage.service
-ConditionVirtualization=!container
-
-[Service]
-ExecStart=/lib/systemd/pld-storage-init
-Type=oneshot
-TimeoutSec=0
-RemainAfterExit=yes
diff --git a/pld-storage-init.sh b/pld-storage-init.sh
deleted file mode 100644
index 7673c59..0000000
--- a/pld-storage-init.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-# Read functions
-. /lib/rc-scripts/functions
-
-if ! is_no "$DM_MULTIPATH" && [ -x /sbin/multipath ]; then
-	modprobe -s dm-mod >/dev/null 2>&1
-	modprobe -s dm-multipath >/dev/null 2>&1
-	/sbin/multipath -v 0
-	[ -x /sbin/kpartx ] && /sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -u -a -p p'
-fi
-
-if [ -x /sbin/dmraid ]; then
-	modprobe -s dm-mod >/dev/null 2>&1
-	modprobe -s dm-mirror >/dev/null 2>&1
-	dmraidsets=$(LC_ALL=C /sbin/dmraid -s -c -i)
-	if [ "$?" = "0" ]; then
-		oldIFS=$IFS
-		IFS=$(echo -en "\n\b")
-		for dmname in $dmraidsets ; do
-			[[ "$dmname" = isw_* ]] && continue
-			/sbin/dmraid -ay -i --rm_partitions -p "$dmname"
-			[ -x /sbin/kpartx ] && /sbin/kpartx -u -a -p p "/dev/mapper/$dmname"
-		done
-		IFS=$oldIFS
-	fi
-fi
-
-# Start any MD RAID arrays that haven't been started yet
-[ -r /proc/mdstat ] && /sbin/mdadm -As --auto=yes --run 2>&1
-
-if ! is_no "$LVM2" && [ -x /sbin/lvm ]; then
-	modprobe -s dm-mod >/dev/null 2>&1
-	# --cache to initiate direct device scan and update lvmetad appropriately (if running).
-	# See http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2016-January/157230.html
-	run_cmd "Scanning for LVM volume groups" /sbin/lvm vgscan --ignorelockingfailure --cache
-	run_cmd "Activating LVM volume groups" /sbin/lvm vgchange -a y --sysinit
-	/sbin/lvm vgmknodes --ignorelockingfailure
-fi
-
-exit 0
diff --git a/pld-wait-storage.service b/pld-wait-storage.service
deleted file mode 100644
index 2cc1197..0000000
--- a/pld-wait-storage.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[Unit]
-Description=Wait for storage scan
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=systemd-udev-settle.service
-Before=local-fs.target shutdown.target
-Wants=systemd-udevd.service systemd-udev-settle.service
-
-[Service]
-ExecStart=-/sbin/rmmod scsi_wait_scan
-ExecStart=-/sbin/modprobe scsi_wait_scan
-ExecStart=-/sbin/rmmod scsi_wait_scan
-Type=oneshot
-TimeoutSec=0
-RemainAfterExit=yes
-StandardInput=null
-StandardOutput=null
-StandardError=null
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/81437abca9d28055182e8c40519de78fdac5e975



More information about the pld-cvs-commit mailing list