diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-20 14:35:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-04-20 14:35:09 +0000 |
commit | 846a883af45d2cfe1c6c3558fe9e5366ce0c7022 (patch) | |
tree | fd7547ae8d16da5954a4d95e560982396d7ba67f /init.d | |
parent | 9e4d2c6816c56d8daa94297078f181ec36047df6 (diff) | |
download | alpine-baselayout-846a883af45d2cfe1c6c3558fe9e5366ce0c7022.tar.bz2 alpine-baselayout-846a883af45d2cfe1c6c3558fe9e5366ce0c7022.tar.xz |
switch to openrc
many of the initscripts are moved to there
Diffstat (limited to 'init.d')
-rw-r--r-- | init.d/Makefile | 21 | ||||
-rwxr-xr-x | init.d/alpinecfg.sh | 44 | ||||
-rwxr-xr-x | init.d/bootmisc.sh | 5 | ||||
-rwxr-xr-x | init.d/checkfs | 56 | ||||
-rwxr-xr-x | init.d/networking | 23 |
5 files changed, 1 insertions, 148 deletions
diff --git a/init.d/Makefile b/init.d/Makefile index 21e756c..6ac6cfe 100644 --- a/init.d/Makefile +++ b/init.d/Makefile @@ -1,28 +1,9 @@ -SCRIPTS = alpinecfg.sh \ - bootmisc.sh \ - checkfs \ - checkroot.sh \ - cron \ +SCRIPTS = cron \ dnsd \ - hostname \ httpd \ - hwclock \ hwdrivers \ inetd \ - keymap \ - localinit \ - localmount \ mdev \ - modutils \ - networking \ - procps \ - rc.local \ - rcK \ - rcL \ - rcS \ - rdate\ - runtimes \ - swap\ syslog \ tuntap \ vlan \ diff --git a/init.d/alpinecfg.sh b/init.d/alpinecfg.sh deleted file mode 100755 index 180b6e8..0000000 --- a/init.d/alpinecfg.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/busybox sh - -# the purpose of this script is to find and import the alpine config. -# load it or set default values. - -#depracated -echo "remeber to remove this $0 file..." -exit - -get_boot_var () { - # Look for CFG_MEDIA in cmdline - for i in `cat /proc/cmdline` ; do -# if echo $i | grep $ > /dev/null ; then -# echo $i | sed 's/'$1'=//' -# fi - case $i in - $1=*) echo $i | sed 's|'$1'=||' ;; - esac - done -} - - -import_config() { - if mount $1 ; then - echo "Using Alpine config from $1" - cp $1/$2 /etc/alpine.conf - sleep 1 - umount $1 - fi -} - -CFG="alpine.conf" -CFG_MEDIA=`get_boot_var cfg_media` -#if [ -z "$CFG_MEDIA" ] ; then - # cfg_media was not set in cmdline. We use the defaults... - echo "looking for alpine.conf on default locations" - for i in /media/* ; do - import_config $i $CFG - done -#else - # Only import for specified location -# import_config "/media/$CFG_MEDIA" $CFG -#fi - diff --git a/init.d/bootmisc.sh b/init.d/bootmisc.sh deleted file mode 100755 index be2a035..0000000 --- a/init.d/bootmisc.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -mkdir -p /var/log -dmesg -s 65536 > /var/log/dmesg - diff --git a/init.d/checkfs b/init.d/checkfs deleted file mode 100755 index 5beff0a..0000000 --- a/init.d/checkfs +++ /dev/null @@ -1,56 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -get_bootparam() { - # todo - return 1 -} - -start() { - local rc=0 mode="-p" opts="-A -C0 -R -T" parts= - - ebegin "Checking all filesystems" - - if [ -e /forcefsck ] || get_bootparam "forcefsck" ; then - ewarn "A full fsck has been forced" - mode="-f -n" - fi - - fsck ${opts} ${mode} ${parts} - rc=$? - - if [ ${rc} -eq 0 ] ; then - eend 0 - elif [ ${rc} -eq 1 ] ; then - ewend 1 "Filesystem errors corrected." - rc=0 - elif [ ${rc} -eq 2 ] ; then - ewend 1 "System should be rebooted" - elif [ ${rc} -eq 8 ] ; then - ewend 1 "Operational error, continuing" - rc=0 - else - if [ "${RC_FORCE_AUTO}" = "yes" ] ; then - eend 2 "Fsck could not correct all errors, rerunning" - fsck ${opts} -y ${parts} - retval=$? - eend ${retval} - fi - - if [ ${retval} -gt 3 ] ; then - eend 2 "Fsck could not correct all errors, manual repair needed" -# exec rc-abort || exit 1 - fi - fi - - [ ${rc} = 0 -a -e /forcefsck ] && rm /forcefsck - - return ${rc} -} - -stop() { - return 0 -} - -# vim: set ts=4 : diff --git a/init.d/networking b/init.d/networking deleted file mode 100755 index 11cb8e7..0000000 --- a/init.d/networking +++ /dev/null @@ -1,23 +0,0 @@ -#!/sbin/runscript - -# note that the spoofprotect, syncoockies and ip_forward options are set in -# /etc/sysctl.conf - -start() { - ebegin "Configuring network interfaces" - ifup -a >/dev/null 2>&1 - eend $? -} - -stop() { - ebegin "Deconfiguring network interfaces" - ifdown -a >/dev/null 2>&1 - eend $? -} - -restart() { - ebegin "Reconfiguring network interfaces" - ifdown -a >/dev/null 2>&1 && ifup -a >/dev/null 2>&1 - eend $? -} - |