- do not telinit u if /sbin/init is not sysvinit
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=149
This commit is contained in:
parent
55a3cfce21
commit
dbf9e898fe
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 11 13:46:46 UTC 2011 - coolo@suse.com
|
||||
|
||||
- do not telinit u if /sbin/init is not sysvinit
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 11 11:04:56 UTC 2011 - coolo@suse.com
|
||||
|
||||
|
@ -163,10 +163,10 @@ popd
|
||||
mkdir -m 755 -p ${RPM_BUILD_ROOT}%{_mandir}/man8
|
||||
make install -C src MANPATH=%{_mandir} ROOT=${RPM_BUILD_ROOT} WITH_SELINUX=yes DISTRO=SuSE
|
||||
mv ${RPM_BUILD_ROOT}/sbin/init ${RPM_BUILD_ROOT}/sbin/sysvinit
|
||||
ln -s sysvinit ${RPM_BUILD_ROOT}/sbin/init
|
||||
ln -s /sbin/sysvinit ${RPM_BUILD_ROOT}/sbin/init
|
||||
mkdir -p ${RPM_BUILD_ROOT}/lib/sysvinit
|
||||
ln -sf sysvinit ${RPM_BUILD_ROOT}/lib/sysvinit/telinit
|
||||
ln -sf sysvinit ${RPM_BUILD_ROOT}/sbin/telinit
|
||||
ln -sf /sbin/sysvinit ${RPM_BUILD_ROOT}/lib/sysvinit/telinit
|
||||
ln -sf /sbin/sysvinit ${RPM_BUILD_ROOT}/sbin/telinit
|
||||
test -p ${RPM_BUILD_ROOT}/dev/initctl || {
|
||||
rm -f ${RPM_BUILD_ROOT}/dev/initctl
|
||||
mknod ${RPM_BUILD_ROOT}/dev/initctl p
|
||||
@ -218,9 +218,11 @@ popd
|
||||
%stop_on_removal powered
|
||||
|
||||
%post
|
||||
if test -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root -a ! -d /.build ; then
|
||||
if test $(stat -Lc '%%D-%%i' /) = $(stat -Lc '%%D-%%i' /proc/1/root) ; then
|
||||
/sbin/telinit u
|
||||
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
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user