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:
2017-05-20 09:18:03 -05:00
parent 3112172beb
commit 17afdf7765
6 changed files with 15 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ DESC = This package supplies the base system init scripts for sysvinit
ARCHIVE := '' ARCHIVE := ''
SRCDIR := $(PWD)/SRC/initscripts SRCDIR := $(PWD)/SRC/initscripts
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
VERSION := 1.0-0 VERSION := 1.1-0
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux

View File

@@ -7,8 +7,12 @@ case $1 in
exit 0 exit 0
;; ;;
postinst) postinst)
echo "[ENVIRONMENT]\n"
env
echo "TARGET: ${TARGET}"
if [[ ${TARGET} ]]; then if [[ ${TARGET} ]]; then
chroot ${TARGET} 'update-rc required' chroot ${TARGET} update-rc required
else else
update-rc required update-rc required
fi fi

View File

@@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: checkfs # Provides: checkfs
# Required-Start: udev swap $time hostname hwclock # Required-Start: udev swap $time hostname
# Required-Stop: # Required-Stop:
# Should-Start: # Should-Start:
# Should-Stop: # Should-Stop:

View File

@@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: hostname # Provides: hostname
# Required-Start: $local_fs # Required-Start:
# Required-Stop: $local_fs # Required-Stop:
# Should-Start: # Should-Start:
# Should-Stop # Should-Stop
# Default-Start: S # Default-Start: S

View File

@@ -84,7 +84,7 @@ mountrun () {
chmod 1777 /run/shm || return 1 chmod 1777 /run/shm || return 1
if grep -q '^utmp:' /etc/group; then if grep -q '^utmp:' /etc/group; then
chmod 664 /run/utmp chmod 664 /run/utmp >> /run/utmp
chgrp utmp /run/utmp chgrp utmp /run/utmp
fi fi

View File

@@ -180,14 +180,15 @@ sub readsvcs {
error( int( $! ), "opendir(): " . INITDIR . ": $!" ); error( int( $! ), "opendir(): " . INITDIR . ": $!" );
foreach my $svcname ( sort( readdir( DIR ) ) ) { foreach my $svcname ( sort( readdir( DIR ) ) ) {
if ( ! -X INITDIR . "/$svcname" ) { if ( ! -f INITDIR . "/$svcname" ||
! -X INITDIR . "/$svcname" ) {
next; next;
} }
$services->{$svcname} = readinfo( INITDIR . "/$svcname" ); $services->{$svcname} = readinfo( INITDIR . "/$svcname" );
if ( ! @{$services->{$svcname}{'Provides'}} ) { if ( ! @{$services->{$svcname}{'Provides'}} ) {
undef( $services->{$svcname} ); delete( $services->{$svcname} );
next; next;
} }
@@ -207,7 +208,8 @@ sub sdepends {
my $sdepends = shift || []; my $sdepends = shift || [];
my $stack = shift || []; my $stack = shift || [];
if ( @$stack > 99 ) { if ( $stack->[0] && grep( $_ eq $service->{'name'}, @$stack )
|| @$stack > 99 ) {
return; return;
} }