.
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=188
This commit is contained in:
parent
fae4b203a7
commit
bfcf5dd080
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 24 08:49:40 UTC 2013 - werner@suse.de
|
||||
|
||||
- Add sanity check for /etc/inittab to avoid reload on systemd
|
||||
systems (bnc#813510)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 4 16:16:45 UTC 2013 - coolo@suse.com
|
||||
|
||||
|
@ -32,6 +32,8 @@ BuildRequires: audit-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libsepol-devel
|
||||
BuildRequires: pam-devel
|
||||
Requires(post): coreutils grep mkinitrd
|
||||
Requires(postun): mkinitrd
|
||||
Url: http://savannah.nongnu.org/projects/sysvinit/
|
||||
Source: sysvinit-%{SIVER}dsf.tar.bz2
|
||||
Source2: killproc-%{KPVER}.tar.bz2
|
||||
@ -234,16 +236,22 @@ popd
|
||||
%stop_on_removal powerd
|
||||
|
||||
%post
|
||||
ret=0
|
||||
if test -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root -a ! -d /.build -a -x /sbin/init; then
|
||||
if test $(stat -Lc '%%D-%%i' /) = $(stat -Lc '%%D-%%i' /proc/1/root); then
|
||||
if test $(stat -Lc '%%D-%%i' /sbin/init) = $(stat -Lc '%%D-%%i' /sbin/sysvinit); then
|
||||
/sbin/telinit u
|
||||
fi
|
||||
icount=$(grep -cE '^[[:alnum:]]+:[[:alnum:]]*:' /etc/inittab 2>/dev/null || echo 0)
|
||||
if test $(stat -Lc '%%D-%%i' /) = $(stat -Lc '%%D-%%i' /proc/1/root) -a $icount -gt 6 ; then
|
||||
if test $(stat -Lc '%%D-%%i' /sbin/init) = $(stat -Lc '%%D-%%i' /sbin/sysvinit); then
|
||||
/sbin/telinit u
|
||||
fi
|
||||
elif test $icount -le 6 ; then
|
||||
echo 'Broken /etc/inittab found, installing and using %{name} make no sense!' 1>&2
|
||||
ret=1
|
||||
fi
|
||||
fi
|
||||
if test -x /sbin/mkinitrd_setup; then
|
||||
mkinitrd_setup
|
||||
fi
|
||||
exit $ret
|
||||
|
||||
%postun tools
|
||||
%restart_on_update powerd
|
||||
|
Loading…
Reference in New Issue
Block a user