Accepting request 174100 from Base:System
Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/174100 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sysvinit?expand=0&rev=149
This commit is contained in:
commit
3682d751f4
@ -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
|
Mon Mar 4 16:16:45 UTC 2013 - coolo@suse.com
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ BuildRequires: audit-devel
|
|||||||
BuildRequires: libselinux-devel
|
BuildRequires: libselinux-devel
|
||||||
BuildRequires: libsepol-devel
|
BuildRequires: libsepol-devel
|
||||||
BuildRequires: pam-devel
|
BuildRequires: pam-devel
|
||||||
|
Requires(post): coreutils grep mkinitrd
|
||||||
|
Requires(postun): mkinitrd
|
||||||
Url: http://savannah.nongnu.org/projects/sysvinit/
|
Url: http://savannah.nongnu.org/projects/sysvinit/
|
||||||
Source: sysvinit-%{SIVER}dsf.tar.bz2
|
Source: sysvinit-%{SIVER}dsf.tar.bz2
|
||||||
Source2: killproc-%{KPVER}.tar.bz2
|
Source2: killproc-%{KPVER}.tar.bz2
|
||||||
@ -234,16 +236,22 @@ popd
|
|||||||
%stop_on_removal powerd
|
%stop_on_removal powerd
|
||||||
|
|
||||||
%post
|
%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 -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
|
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
|
if test $(stat -Lc '%%D-%%i' /sbin/init) = $(stat -Lc '%%D-%%i' /sbin/sysvinit); then
|
||||||
/sbin/telinit u
|
/sbin/telinit u
|
||||||
fi
|
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
|
||||||
fi
|
fi
|
||||||
if test -x /sbin/mkinitrd_setup; then
|
if test -x /sbin/mkinitrd_setup; then
|
||||||
mkinitrd_setup
|
mkinitrd_setup
|
||||||
fi
|
fi
|
||||||
|
exit $ret
|
||||||
|
|
||||||
%postun tools
|
%postun tools
|
||||||
%restart_on_update powerd
|
%restart_on_update powerd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user