name = initscripts
epoch = 1
version = 2.99
-release = 10
+release = 11
groups = Base System/Boot
url =
install
cd src && make install clean DESTDIR=%{BUILDROOT}
+ # Install rc.local
+ install -v -m 755 %{DIR_SOURCE}/rc.local %{BUILDROT}/etc/rc.local
+
# Install udev rules
mkdir -pv %{BUILDROOT}/lib/udev/rules.d/
cp -vf %{DIR_SOURCE}/udev/* %{BUILDROOT}/lib/udev/rules.d/
util-linux
end
+ configfiles
+ /etc/rc.local
+ end
+
prerequires = coreutils shadow-utils
script prein
chown root:utmp /var/log/{b,w}tmp /var/run/utmp
chmod 664 /var/log/wtmp /var/run/utmp
chmod 600 /var/log/btmp
+
+ # Just search for new unit files that were just installed.
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+ # Enable rc.local as default.
+ /bin/systemctl --no-reload enable rc-local.service >/dev/null 2>&1 || :
+ end
+
+ # Disable the service that is to be removed and stop it if it is still running.
+ script preun
+ /bin/systemctl --no-reload disable rc-local.service >/dev/null 2>&1 || :
+ /bin/systemctl stop rc-local.service >/dev/null 2>&1 || :
+ end
+
+ # Just tell systemd that unitfiles have been removed.
+ script postun
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
end
end
end
--- /dev/null
+[Unit]
+Description=/etc/rc.local Compatiblity
+ConditionFileIsExecuteable=/etc/rc.local
+Requires=multi-user.target
+After=multi-user.target network.target
+
+[Service]
+Type=forking
+ExecStart=/etc/rc.local
+TimeoutSec=0
+StandardOutput=tty
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target