The following changes were made:
* removed quotes around chroot command in usher * removed hwclock from Required-Start in checkfs * removed $local_fs from Required-Start in hostname * updated mountvirtfs to create /run/utmp * added 2 conditionals to readsvcs() in update-rc
This commit is contained in:
2
Makefile
2
Makefile
@@ -17,7 +17,7 @@ DESC = This package supplies the base system init scripts for sysvinit
|
||||
ARCHIVE := ''
|
||||
SRCDIR := $(PWD)/SRC/initscripts
|
||||
PATCHDIR := $(PWD)/SRC/patches
|
||||
VERSION := 1.0-0
|
||||
VERSION := 1.1-0
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
|
||||
@@ -7,8 +7,12 @@ case $1 in
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
echo "[ENVIRONMENT]\n"
|
||||
env
|
||||
echo "TARGET: ${TARGET}"
|
||||
|
||||
if [[ ${TARGET} ]]; then
|
||||
chroot ${TARGET} 'update-rc required'
|
||||
chroot ${TARGET} update-rc required
|
||||
else
|
||||
update-rc required
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: checkfs
|
||||
# Required-Start: udev swap $time hostname hwclock
|
||||
# Required-Start: udev swap $time hostname
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: hostname
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop: $local_fs
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Should-Start:
|
||||
# Should-Stop
|
||||
# Default-Start: S
|
||||
|
||||
@@ -84,7 +84,7 @@ mountrun () {
|
||||
chmod 1777 /run/shm || return 1
|
||||
|
||||
if grep -q '^utmp:' /etc/group; then
|
||||
chmod 664 /run/utmp
|
||||
chmod 664 /run/utmp >> /run/utmp
|
||||
chgrp utmp /run/utmp
|
||||
fi
|
||||
|
||||
|
||||
@@ -180,14 +180,15 @@ sub readsvcs {
|
||||
error( int( $! ), "opendir(): " . INITDIR . ": $!" );
|
||||
|
||||
foreach my $svcname ( sort( readdir( DIR ) ) ) {
|
||||
if ( ! -X INITDIR . "/$svcname" ) {
|
||||
if ( ! -f INITDIR . "/$svcname" ||
|
||||
! -X INITDIR . "/$svcname" ) {
|
||||
next;
|
||||
}
|
||||
|
||||
$services->{$svcname} = readinfo( INITDIR . "/$svcname" );
|
||||
|
||||
if ( ! @{$services->{$svcname}{'Provides'}} ) {
|
||||
undef( $services->{$svcname} );
|
||||
delete( $services->{$svcname} );
|
||||
|
||||
next;
|
||||
}
|
||||
@@ -207,7 +208,8 @@ sub sdepends {
|
||||
my $sdepends = shift || [];
|
||||
my $stack = shift || [];
|
||||
|
||||
if ( @$stack > 99 ) {
|
||||
if ( $stack->[0] && grep( $_ eq $service->{'name'}, @$stack )
|
||||
|| @$stack > 99 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user