]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - initscripts/initscripts.nm
Merge remote-tracking branch 'stevee/rc.local-fix'
[people/amarx/ipfire-3.x.git] / initscripts / initscripts.nm
CommitLineData
ccbe9281 1###############################################################################
802ea3af
MT
2# IPFire.org - An Open Source Firewall Solution #
3# Copyright (C) - IPFire Development Team <info@ipfire.org> #
ccbe9281
MT
4###############################################################################
5
802ea3af
MT
6name = initscripts
7epoch = 1
8version = 2.99
2afe3d24 9release = 14
ccbe9281 10
31f3f78e 11groups = System/Boot
802ea3af
MT
12url =
13license = GPLv3+
14summary = The set of scripts that initalize the system.
ccbe9281 15
802ea3af 16description
ccbe9281
MT
17 The initscripts package contains the basic system scripts used to boot \
18 your system and shut the system down cleanly.
802ea3af
MT
19end
20
21# Nothing to download.
22sources =
23
24build
25 requires
26 glib2-devel
27 popt-devel
28 end
29
30 DIR_APP = %{DIR_SOURCE}
31
32 prepare_cmds
33 cd src && make clean
34 end
35
36 build
37 cd src && make %{PARALLELISMFLAGS}
38 end
39
40 test
41 cd src && make test
42 end
43
44 install
45 cd src && make install clean DESTDIR=%{BUILDROOT}
46
1a011e61
SS
47 # Install rc.local
48 install -v -m 755 %{DIR_SOURCE}/rc.local %{BUILDROT}/etc/rc.local
49
802ea3af
MT
50 # Install udev rules
51 mkdir -pv %{BUILDROOT}/lib/udev/rules.d/
52 cp -vf %{DIR_SOURCE}/udev/* %{BUILDROOT}/lib/udev/rules.d/
53 end
54end
55
56packages
57 package %{name}
31f3f78e
MT
58 groups += Base
59
802ea3af
MT
60 requires
61 bash
62 coreutils
63 e2fsprogs
64 grep
65 iproute2
66 module-init-tools
67 procps
68 sed
69 system-release
70 udev
71 util-linux
72 end
20173b6d 73
1a011e61
SS
74 configfiles
75 /etc/rc.local
76 end
77
815db639
MT
78 prerequires
79 coreutils
80 shadow-utils
81 end
20173b6d
MT
82
83 script prein
84 groupadd -g 22 -r -f utmp
85 end
86
87 script postin
88 touch /var/log/{b,w}tmp /var/run/utmp
89 chown root:utmp /var/log/{b,w}tmp /var/run/utmp
90 chmod 664 /var/log/wtmp /var/run/utmp
91 chmod 600 /var/log/btmp
1a011e61
SS
92
93 # Just search for new unit files that were just installed.
94 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
95
96 # Enable rc.local as default.
97 /bin/systemctl --no-reload enable rc-local.service >/dev/null 2>&1 || :
98 end
99
100 # Disable the service that is to be removed and stop it if it is still running.
101 script preun
102 /bin/systemctl --no-reload disable rc-local.service >/dev/null 2>&1 || :
103 /bin/systemctl stop rc-local.service >/dev/null 2>&1 || :
104 end
105
106 # Just tell systemd that unitfiles have been removed.
107 script postun
108 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
20173b6d 109 end
802ea3af 110 end
1f9bc2f0
MT
111
112 package %{name}-debuginfo
113 template DEBUGINFO
114 end
802ea3af 115end