Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7de71fa1cd | ||
|
|
97906ebe04 |
4
Makefile
4
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.5-0
|
||||
VERSION := 1.8-0
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
# be enough
|
||||
#
|
||||
|
||||
if [ -r /proc/1/environ ]; then
|
||||
chkcontainer=$(sed 's/\x0/\n/g' < /proc/1/environ|grep -ia '^container\|^LXC')
|
||||
fi
|
||||
|
||||
[ -n "$chkcontainer" ] && export $chkcontainer
|
||||
|
||||
COL52="\\033[52G"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 /
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user