The following changes were made
* Moved update-rc to /usr/sbin * init-functions now exports container variable * init.d scripts should now act appropriately in containers * Removed localnet init script - should be performed by iftools init * Added REPO to Makefile
This commit is contained in:
7
Makefile
7
Makefile
@@ -8,16 +8,17 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
DEPENDS = dash,iftools,kmod,procps-ng,sysvinit
|
||||
DEPENDS = dash,kmod,procps-ng,sysvinit
|
||||
ARCH = x86_64
|
||||
URL =
|
||||
REPO = core
|
||||
BRIEF = Base scripts for sysvinit
|
||||
DESC = This package supplies the base system init scripts for sysvinit
|
||||
DESC = This package supplies the core required init scripts for startup
|
||||
|
||||
ARCHIVE := ''
|
||||
SRCDIR := $(PWD)/SRC/initscripts
|
||||
PATCHDIR := $(PWD)/SRC/patches
|
||||
VERSION := 1.4-0
|
||||
VERSION := 1.5-0
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ dirs:
|
||||
install -d -m 755 $(DESTDIR)/lib/lsb
|
||||
install -d -m 755 $(DESTDIR)/usr/share/initscripts
|
||||
install -d -m 755 $(DESTDIR)/usr/share/man/man8
|
||||
install -d -m 755 $(DESTDIR)/sbin
|
||||
install -d -m 755 $(DESTDIR)/usr/sbin
|
||||
|
||||
files:
|
||||
install -m 755 init.d/checkfs $(DESTDIR)/etc/init.d/checkfs
|
||||
@@ -12,7 +12,6 @@ files:
|
||||
install -m 755 init.d/halt $(DESTDIR)/etc/init.d/halt
|
||||
install -m 755 init.d/hostname $(DESTDIR)/etc/init.d/hostname
|
||||
install -m 755 init.d/hwclock $(DESTDIR)/etc/init.d/hwclock
|
||||
install -m 755 init.d/localnet $(DESTDIR)/etc/init.d/localnet
|
||||
install -m 755 init.d/modules $(DESTDIR)/etc/init.d/modules
|
||||
install -m 755 init.d/mountfs $(DESTDIR)/etc/init.d/mountfs
|
||||
install -m 755 init.d/mountvirtfs $(DESTDIR)/etc/init.d/mountvirtfs
|
||||
@@ -30,6 +29,6 @@ files:
|
||||
$(DESTDIR)/usr/share/initscripts/modules.conf
|
||||
install -m 644 rcS.default \
|
||||
$(DESTDIR)/usr/share/initscripts/rcS.default
|
||||
install -m 755 update-rc $(DESTDIR)/sbin
|
||||
install -m 755 update-rc $(DESTDIR)/usr/sbin
|
||||
|
||||
install: dirs files
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
# be enough
|
||||
#
|
||||
|
||||
export $(sed 's/\x0/\n/g' < /proc/1/environ|grep -ia '^container\|^LXC')
|
||||
chkcontainer=$(sed 's/\x0/\n/g' < /proc/1/environ|grep -ia '^container\|^LXC')
|
||||
[ -n "$chkcontainer" ] && export $chkcontainer
|
||||
|
||||
COL52="\\033[52G"
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
[ -z $container ] || exit 0
|
||||
|
||||
case "$1" in
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
[ -z "$CLEANDIRS" ] && exit 0
|
||||
[ -z $container ] || exit 0
|
||||
|
||||
clean() {
|
||||
[ -d $1 ] || return 1
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
[ -r /etc/default/rcS ] && . /etc/default/rcS
|
||||
[ -z $container ] || exit 0
|
||||
|
||||
case "$UTC" in
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: localnet
|
||||
# Required-Start: $local_fs
|
||||
# Required-Stop: $local_fs
|
||||
# Should-Start: $syslog
|
||||
# Should-Stop: $syslog
|
||||
# Default-Start: S
|
||||
# Default-Stop: 0 6
|
||||
# Short-Description: Start and configure loopback interface
|
||||
# X-Required: true
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_init_msg "Bringing up loopback interface"
|
||||
ifup lo && log_success_msg || log_failure_msg
|
||||
;;
|
||||
stop)
|
||||
log_init_msg "Bringing down loopback interface"
|
||||
ifdown lo && log_success_msg || log_failure_msg
|
||||
;;
|
||||
|
||||
reload|restart)
|
||||
log_init_msg "Restarting loopback interface"
|
||||
ifreload lo && log_success_msg || log_failure_msg
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 [start|stop|reload|restart]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -15,6 +15,7 @@ CONF=/etc/modules.conf
|
||||
|
||||
[ -r $CONF ] || exit 0
|
||||
[ -e /proc/modules ] || exit 0
|
||||
[ -z $container ] || exit 0
|
||||
egrep -qv '^(\s*#|$)' $CONF || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
[ -r /etc/fstab ] || exit 0
|
||||
[ -z $container ] || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
CONF=/etc/sysctl.conf
|
||||
[ -r $CONF ] || exit 0
|
||||
[ -z $container ] || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user