From 06e0a487c74c650c261bd09e8e9b27e69c3bae89 Mon Sep 17 00:00:00 2001 From: Scott Little Date: Mon, 2 Oct 2017 14:49:27 -0400 Subject: [PATCH 05/13] WRS: spec-add-mountnfs-init-script.patch --- SPECS/initscripts.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SPECS/initscripts.spec b/SPECS/initscripts.spec index 6ec4bea..5ba669b 100644 --- a/SPECS/initscripts.spec +++ b/SPECS/initscripts.spec @@ -11,9 +11,12 @@ Source: https://github.com/fedora-sysv/initscripts/archive/%{version}.tar.gz#/%{ # WRS Source1: sysctl.conf Source2: sysconfig-network.conf +Source3: mountnfs.sh +Source4: mountnfs.service BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Obsoletes: initscripts-legacy <= 9.39 +Requires: /usr/bin/systemctl Requires: /bin/awk, sed, coreutils Requires: /sbin/sysctl Requires: grep @@ -93,6 +96,11 @@ chmod 600 $RPM_BUILD_ROOT/etc/crypttab install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/sysctl.conf install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/network +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/mountnfs + +install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir}/mountnfs.service + %pre /usr/sbin/groupadd -g 22 -r -f utmp @@ -101,6 +109,7 @@ touch /var/log/wtmp /var/run/utmp /var/log/btmp chown root:utmp /var/log/wtmp /var/run/utmp /var/log/btmp chmod 664 /var/log/wtmp /var/run/utmp chmod 600 /var/log/btmp +/usr/bin/systemctl enable mountnfs.service > /dev/null 2>&1 || : /usr/sbin/chkconfig --add network /usr/sbin/chkconfig --add netconsole @@ -226,6 +235,8 @@ rm -rf $RPM_BUILD_ROOT %ghost %{_localstatedir}/log/dmesg.old # WRS /etc/sysconfig/network +/etc/rc.d/init.d/mountnfs +%{_unitdir}/mountnfs.service %files -n debugmode %defattr(-,root,root) -- 1.9.1