diff --git a/Makefile b/Makefile index 0afa980..23142ba 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ DEPENDS = dash,kmod,procps-ng,sysvinit ARCH = x86_64 -URL = +URL = http://snaplinux.org REPO = core BRIEF = Base scripts for sysvinit 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 := '' SRCDIR := $(PWD)/SRC/initscripts PATCHDIR := $(PWD)/SRC/patches -VERSION := 1.6-0 +VERSION := 1.8-0 include /usr/share/snap/Makefile.snaplinux diff --git a/SRC/initscripts/Makefile b/SRC/initscripts/Makefile index 8cd6562..326c2ee 100644 --- a/SRC/initscripts/Makefile +++ b/SRC/initscripts/Makefile @@ -1,6 +1,6 @@ dirs: 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)/usr/share/initscripts install -d -m 755 $(DESTDIR)/usr/share/man/man8 @@ -30,5 +30,6 @@ files: install -m 644 rcS.default \ $(DESTDIR)/usr/share/initscripts/rcS.default install -m 755 update-rc $(DESTDIR)/usr/sbin + install -m 755 service $(DESTDIR)/usr/sbin install: dirs files diff --git a/SRC/initscripts/init.d/checkfs b/SRC/initscripts/init.d/checkfs index 0739f93..562848f 100755 --- a/SRC/initscripts/init.d/checkfs +++ b/SRC/initscripts/init.d/checkfs @@ -13,6 +13,8 @@ . /lib/lsb/init-functions [ -z $container ] || exit 0 +[ -z "$VERBOSE" ] && VERBOSE=no +[ -z "$FSCKFIX" ] && FSCKFIX=no case "$1" in start) @@ -71,7 +73,7 @@ case "$1" in case "$VERBOSE" in 1|y|yes) echo - if [ $status == 0 ]; then + if [ "$status" = 0 ]; then exit 0 else log_init_msg "Filesystem issues detected" @@ -79,15 +81,15 @@ case "$1" in ;; esac - if [ $status == 0 ]; then + if [ "$status" = 0 ]; then log_success_msg - elif [ $status != 1 ]; then + elif [ "$status" = 1 ]; then log_warning_msg echo echo "WARNING: File system errors were detected and repaired." echo - elif [ $status == 2 -o $status == 3 ]; then + elif [ "$status" = 2 -o "$status" = 3 ]; then log_warning_msg echo @@ -97,7 +99,7 @@ case "$1" in echo "Press enter to reboot" read reboot -f - elif [ $status -gt 3 -a $status -lt 16 ]; then + elif [ "$status" -gt 3 -a "$status" -lt 16 ]; then log_failure_msg echo diff --git a/SRC/initscripts/init.d/halt b/SRC/initscripts/init.d/halt index a1596ca..c808112 100755 --- a/SRC/initscripts/init.d/halt +++ b/SRC/initscripts/init.d/halt @@ -19,11 +19,11 @@ case "$1" in poweroff='-p' netdown='-i' - if [ "$HALT" == "halt" ]; then + if [ "$HALT" = "halt" ]; then poweroff='' fi - if [ "$NETDOWN" == "no" ]; then + if [ "$NETDOWN" = "no" ]; then netdown='' fi diff --git a/SRC/initscripts/init.d/mountfs b/SRC/initscripts/init.d/mountfs index dc612cd..a130056 100755 --- a/SRC/initscripts/init.d/mountfs +++ b/SRC/initscripts/init.d/mountfs @@ -9,8 +9,8 @@ # Default-Stop: 0 6 # Short-Description: Mounts/unmounts local filesystems # Description: Remounts root filesystem read/write and mounts all -# remaining local filesystems defined in /etc/fstab or -# in ZFS. Remounts root filesystem read-only and unmounts +# remaining local filesystems defined in /etc/fstab. +# Remounts root filesystem read-only and unmounts # remaining filesystems on stop. # X-Required: true ### END INIT INFO @@ -34,13 +34,6 @@ case "$1" in rm /forcefsck && log_success_msg || log_failure_msg 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" 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 \ >/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 / ;; *) diff --git a/SRC/initscripts/init.d/sendsignals b/SRC/initscripts/init.d/sendsignals index 194816e..c7fb754 100755 --- a/SRC/initscripts/init.d/sendsignals +++ b/SRC/initscripts/init.d/sendsignals @@ -29,7 +29,7 @@ case "$1" in log_init_msg "Sending all processes the KILL signal" killall5 -9 - if [ "$?" == 0 -o "$?" == 2 ]; then + if [ "$?" = 0 -o "$?" = 2 ]; then success=1 fi fi