1 Commits

Author SHA1 Message Date
Jay Larson
7de71fa1cd The following changes were made:
* Add URL
  * Removed /etc/rcX.d directories (should be provided by sysvinit)
  * Added 'service' script
  * Properly set VERBOSE and FSCKFIX in init.d/checkfs
  * Used = in favor of == in checkfs, halt and sendsignals
  * Removed ZFS from mountfs
2018-04-10 11:25:20 -05:00
6 changed files with 16 additions and 27 deletions

View File

@@ -10,7 +10,7 @@
DEPENDS = dash,kmod,procps-ng,sysvinit DEPENDS = dash,kmod,procps-ng,sysvinit
ARCH = x86_64 ARCH = x86_64
URL = URL = http://snaplinux.org
REPO = core REPO = core
BRIEF = Base scripts for sysvinit BRIEF = Base scripts for sysvinit
DESC = This package supplies the core required init scripts for startup DESC = This package supplies the core required init scripts for startup
@@ -18,7 +18,7 @@ DESC = This package supplies the core required init scripts for startup
ARCHIVE := '' ARCHIVE := ''
SRCDIR := $(PWD)/SRC/initscripts SRCDIR := $(PWD)/SRC/initscripts
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
VERSION := 1.6-0 VERSION := 1.8-0
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux

View File

@@ -1,6 +1,6 @@
dirs: dirs:
install -d -m 755 $(DESTDIR)/etc/default install -d -m 755 $(DESTDIR)/etc/default
install -d -m 755 $(DESTDIR)/etc/{rc{{0..6},S},init}.d install -d -m 755 $(DESTDIR)/etc/init.d
install -d -m 755 $(DESTDIR)/lib/lsb install -d -m 755 $(DESTDIR)/lib/lsb
install -d -m 755 $(DESTDIR)/usr/share/initscripts install -d -m 755 $(DESTDIR)/usr/share/initscripts
install -d -m 755 $(DESTDIR)/usr/share/man/man8 install -d -m 755 $(DESTDIR)/usr/share/man/man8
@@ -30,5 +30,6 @@ files:
install -m 644 rcS.default \ install -m 644 rcS.default \
$(DESTDIR)/usr/share/initscripts/rcS.default $(DESTDIR)/usr/share/initscripts/rcS.default
install -m 755 update-rc $(DESTDIR)/usr/sbin install -m 755 update-rc $(DESTDIR)/usr/sbin
install -m 755 service $(DESTDIR)/usr/sbin
install: dirs files install: dirs files

View File

@@ -13,6 +13,8 @@
. /lib/lsb/init-functions . /lib/lsb/init-functions
[ -z $container ] || exit 0 [ -z $container ] || exit 0
[ -z "$VERBOSE" ] && VERBOSE=no
[ -z "$FSCKFIX" ] && FSCKFIX=no
case "$1" in case "$1" in
start) start)
@@ -71,7 +73,7 @@ case "$1" in
case "$VERBOSE" in case "$VERBOSE" in
1|y|yes) 1|y|yes)
echo echo
if [ $status == 0 ]; then if [ "$status" = 0 ]; then
exit 0 exit 0
else else
log_init_msg "Filesystem issues detected" log_init_msg "Filesystem issues detected"
@@ -79,15 +81,15 @@ case "$1" in
;; ;;
esac esac
if [ $status == 0 ]; then if [ "$status" = 0 ]; then
log_success_msg log_success_msg
elif [ $status != 1 ]; then elif [ "$status" = 1 ]; then
log_warning_msg log_warning_msg
echo echo
echo "WARNING: File system errors were detected and repaired." echo "WARNING: File system errors were detected and repaired."
echo echo
elif [ $status == 2 -o $status == 3 ]; then elif [ "$status" = 2 -o "$status" = 3 ]; then
log_warning_msg log_warning_msg
echo echo
@@ -97,7 +99,7 @@ case "$1" in
echo "Press enter to reboot" echo "Press enter to reboot"
read read
reboot -f reboot -f
elif [ $status -gt 3 -a $status -lt 16 ]; then elif [ "$status" -gt 3 -a "$status" -lt 16 ]; then
log_failure_msg log_failure_msg
echo echo

View File

@@ -19,11 +19,11 @@ case "$1" in
poweroff='-p' poweroff='-p'
netdown='-i' netdown='-i'
if [ "$HALT" == "halt" ]; then if [ "$HALT" = "halt" ]; then
poweroff='' poweroff=''
fi fi
if [ "$NETDOWN" == "no" ]; then if [ "$NETDOWN" = "no" ]; then
netdown='' netdown=''
fi fi

View File

@@ -9,8 +9,8 @@
# Default-Stop: 0 6 # Default-Stop: 0 6
# Short-Description: Mounts/unmounts local filesystems # Short-Description: Mounts/unmounts local filesystems
# Description: Remounts root filesystem read/write and mounts all # Description: Remounts root filesystem read/write and mounts all
# remaining local filesystems defined in /etc/fstab or # remaining local filesystems defined in /etc/fstab.
# in ZFS. Remounts root filesystem read-only and unmounts # Remounts root filesystem read-only and unmounts
# remaining filesystems on stop. # remaining filesystems on stop.
# X-Required: true # X-Required: true
### END INIT INFO ### END INIT INFO
@@ -34,13 +34,6 @@ case "$1" in
rm /forcefsck && log_success_msg || log_failure_msg rm /forcefsck && log_success_msg || log_failure_msg
fi fi
if [ -x /sbin/zpool ]; then
if zpool list rpool 2>&1 > /dev/null; then
log_init_msg "Mounting ZFS file systems"
zfs mount -a && log_success_msg || log_failure_msg
fi
fi
log_init_msg "Mounting remaining file systems" log_init_msg "Mounting remaining file systems"
mount -a -O no_netdev >/dev/null && log_success_msg || log_failure_msg mount -a -O no_netdev >/dev/null && log_success_msg || log_failure_msg
;; ;;
@@ -49,13 +42,6 @@ case "$1" in
umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts \ umount -a -d -r -t notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts \
>/dev/null && log_success_msg || log_failure_msg >/dev/null && log_success_msg || log_failure_msg
if [ -x /sbin/zpool ]; then
if zpool list rpool 2>&1 > /dev/null; then
log_init_msg "Unmounting ZFS file systems"
zfs umount -a && log_success_msg || log_failure_msg
fi
fi
mount -o remount,ro / mount -o remount,ro /
;; ;;
*) *)

View File

@@ -29,7 +29,7 @@ case "$1" in
log_init_msg "Sending all processes the KILL signal" log_init_msg "Sending all processes the KILL signal"
killall5 -9 killall5 -9
if [ "$?" == 0 -o "$?" == 2 ]; then if [ "$?" = 0 -o "$?" = 2 ]; then
success=1 success=1
fi fi
fi fi