]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - initscripts/initscripts.nm
Merge remote-tracking branch 'stevee/openvswitch-systemd'
[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
da6bca58 9release = 17
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
620459d1
MT
28 shadow-utils
29 systemd-units
802ea3af
MT
30 end
31
32 DIR_APP = %{DIR_SOURCE}
33
34 prepare_cmds
35 cd src && make clean
36 end
37
38 build
39 cd src && make %{PARALLELISMFLAGS}
40 end
41
42 test
43 cd src && make test
44 end
45
46 install
47 cd src && make install clean DESTDIR=%{BUILDROOT}
48
1a011e61
SS
49 # Install rc.local
50 install -v -m 755 %{DIR_SOURCE}/rc.local %{BUILDROT}/etc/rc.local
51
802ea3af 52 # Install udev rules
620459d1
MT
53 mkdir -pv %{BUILDROOT}%{prefix}/lib/udev/rules.d/
54 cp -vf %{DIR_SOURCE}/udev/* %{BUILDROOT}%{prefix}/lib/udev/rules.d/
802ea3af
MT
55 end
56end
57
58packages
59 package %{name}
31f3f78e
MT
60 groups += Base
61
802ea3af
MT
62 requires
63 bash
64 coreutils
65 e2fsprogs
66 grep
67 iproute2
68 module-init-tools
69 procps
70 sed
71 system-release
72 udev
73 util-linux
74 end
3f9e64bf
MT
75
76 provides
77 /bin/ipcalc
78 end
20173b6d 79
620459d1
MT
80 conflicts
81 filesystem < 002
82 end
83
1a011e61
SS
84 configfiles
85 /etc/rc.local
86 end
87
815db639
MT
88 prerequires
89 coreutils
90 shadow-utils
91 end
20173b6d
MT
92
93 script prein
94 groupadd -g 22 -r -f utmp
95 end
96
97 script postin
98 touch /var/log/{b,w}tmp /var/run/utmp
99 chown root:utmp /var/log/{b,w}tmp /var/run/utmp
100 chmod 664 /var/log/wtmp /var/run/utmp
101 chmod 600 /var/log/btmp
1a011e61
SS
102
103 # Just search for new unit files that were just installed.
104 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
105
106 # Enable rc.local as default.
107 /bin/systemctl --no-reload enable rc-local.service >/dev/null 2>&1 || :
108 end
109
110 # Disable the service that is to be removed and stop it if it is still running.
111 script preun
112 /bin/systemctl --no-reload disable rc-local.service >/dev/null 2>&1 || :
113 /bin/systemctl stop rc-local.service >/dev/null 2>&1 || :
114 end
115
116 # Just tell systemd that unitfiles have been removed.
117 script postun
118 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
20173b6d 119 end
802ea3af 120 end
1f9bc2f0
MT
121
122 package %{name}-debuginfo
123 template DEBUGINFO
124 end
802ea3af 125end