aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-12-14 14:12:38 +0000
committerRoy Marples <roy@marples.name>2007-12-14 14:12:38 +0000
commit9f2403dffae514dca431828014a2dc9c9de4e61f (patch)
treebc1bd6ae83589f729a3bf7ca6d5ab592cbec56fd
parenta3db3bac6242ff29871161620d0449125b3262aa (diff)
Remove Gentoo copyright from all files that I know I have written
-rw-r--r--HACKING27
-rw-r--r--Makefile4
-rw-r--r--conf.d.BSD/net.example4
-rw-r--r--conf.d/local18
-rw-r--r--conf.d/local.start5
-rw-r--r--conf.d/local.stop8
-rw-r--r--etc.BSD/rc1
-rw-r--r--etc.BSD/rc.shutdown1
-rwxr-xr-xinit.d.BSD/clock1
-rw-r--r--init.d.BSD/devd1
-rwxr-xr-xinit.d.BSD/dumpon1
-rw-r--r--init.d.BSD/hostid1
-rw-r--r--init.d.BSD/mixer1
-rw-r--r--init.d.BSD/newsyslog1
-rw-r--r--init.d.BSD/nscd1
-rw-r--r--init.d.BSD/powerd1
-rw-r--r--init.d.BSD/rarpd1
-rw-r--r--init.d.BSD/rpcbind1
-rwxr-xr-xinit.d.BSD/savecore1
-rw-r--r--init.d.BSD/sysctl1
-rw-r--r--init.d.BSD/syslogd1
-rwxr-xr-xinit.d.Linux/clock55
-rwxr-xr-xinit.d.Linux/consolefont51
-rwxr-xr-xinit.d.Linux/keymaps18
-rwxr-xr-xinit.d.Linux/numlock1
-rw-r--r--init.d.Linux/procfs1
-rw-r--r--init.d.Linux/sysctl1
-rw-r--r--init.d.misc/dnsmasq1
-rw-r--r--init.d.misc/sshd1
-rwxr-xr-xinit.d/bootmisc15
-rwxr-xr-xinit.d/checkfs15
-rwxr-xr-xinit.d/checkroot27
-rwxr-xr-xinit.d/halt.sh17
-rwxr-xr-xinit.d/hostname1
-rwxr-xr-xinit.d/local18
-rwxr-xr-xinit.d/localmount1
-rwxr-xr-xinit.d/netmount12
-rwxr-xr-xinit.d/rmnologin40
-rwxr-xr-xinit.d/urandom3
-rw-r--r--net.BSD/ifconfig.sh1
-rw-r--r--net.BSD/iwconfig.sh1
-rw-r--r--net.Linux/apipa.sh1
-rw-r--r--net.Linux/arping.sh1
-rw-r--r--net.Linux/bonding.sh1
-rw-r--r--net.Linux/br2684ctl.sh1
-rw-r--r--net.Linux/bridge.sh1
-rw-r--r--net.Linux/ccwgroup.sh1
-rw-r--r--net.Linux/ifconfig.sh1
-rw-r--r--net.Linux/ifplugd.sh1
-rw-r--r--net.Linux/ip6to4.sh1
-rw-r--r--net.Linux/ipppd.sh1
-rw-r--r--net.Linux/iproute2.sh1
-rw-r--r--net.Linux/iwconfig.sh1
-rw-r--r--net.Linux/netplugd.sh1
-rw-r--r--net.Linux/pump.sh1
-rw-r--r--net.Linux/tuntap.sh1
-rw-r--r--net.Linux/udhcpc.sh1
-rw-r--r--net.Linux/vlan.sh1
-rw-r--r--net/dhclient.sh3
-rw-r--r--net/dhcpcd.sh1
-rw-r--r--net/macchanger.sh6
-rw-r--r--net/macnet.sh1
-rw-r--r--net/ssidnet.sh1
-rw-r--r--net/system.sh4
-rw-r--r--net/wpa_supplicant.sh1
-rwxr-xr-xsh.BSD/init.sh1
-rwxr-xr-xsh.Linux/init-early.sh1
-rwxr-xr-xsh.Linux/init.sh18
-rw-r--r--sh/functions.sh96
-rwxr-xr-xsh/gendepends.sh1
-rw-r--r--sh/init-common-post.sh1
-rwxr-xr-xsh/net.sh1
-rw-r--r--sh/rc-mount.sh1
-rwxr-xr-xsh/runscript.sh1
-rw-r--r--src/Makefile3
-rw-r--r--src/_usage.c1
-rw-r--r--src/_usage.h1
-rw-r--r--src/builtins.h1
-rw-r--r--src/checkown.c1
-rw-r--r--src/einfo.h1
-rw-r--r--src/fstabinfo.c1
-rw-r--r--src/hidden-visibility.h25
-rw-r--r--src/libeinfo.c4
-rw-r--r--src/librc-daemon.c1
-rw-r--r--src/librc-depend.c1
-rw-r--r--src/librc-depend.h1
-rw-r--r--src/librc-misc.c1
-rw-r--r--src/librc-strlist.c1
-rw-r--r--src/librc.c4
-rw-r--r--src/librc.h1
-rw-r--r--src/mountinfo.c1
-rw-r--r--src/rc-depend.c1
-rw-r--r--src/rc-logger.c1
-rw-r--r--src/rc-logger.h6
-rw-r--r--src/rc-misc.c1
-rw-r--r--src/rc-misc.h1
-rw-r--r--src/rc-plugin.c1
-rw-r--r--src/rc-plugin.h1
-rw-r--r--src/rc-status.c1
-rw-r--r--src/rc-update.c1
-rw-r--r--src/rc.c4
-rw-r--r--src/rc.h1
-rw-r--r--src/runscript.c1
-rw-r--r--src/start-stop-daemon.c1
-rw-r--r--src/strlist.h1
105 files changed, 137 insertions, 450 deletions
diff --git a/HACKING b/HACKING
deleted file mode 100644
index 116a07cd..00000000
--- a/HACKING
+++ /dev/null
@@ -1,27 +0,0 @@
-------------
- QEMU NOTES
-------------
-
-Since the qemu docs blow, I'll make some quick notes here for how to get a
-system running for baselayout testing.
-
-- create rootfs (feel free to tweak 500M):
- $ dd if=/dev/zero of=root.img bs=1M count=500M
- $ mke2fs -F -j root.img
-- install Gentoo stage3:
- $ mkdir loop
- $ mount -o loop root.img loop
- $ sudo tar pjxf stage3-x86.tar.bz2 -C loop
- $ sudo chroot loop
- <all you really need to configure is like /etc/fstab>
- /dev/hda / ext3 noatime 0 1
- $ umount loop
-- create an x86 kernel from a vanilla tarball:
- - make sure you enable serial console support
- - you shouldn't need any modifications, just grab a recent vanilla
-- run qemu:
- $ qemu \
- -hda root.img \
- -append "root=/dev/hda console=ttyS0" \
- -kernel your-compiled-vmlinux \
- -nographic
diff --git a/Makefile b/Makefile
index 0c2f6c0f..6e5a0310 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-# Open Run Control Makefile
-# Copyright 2006-2007 Gentoo Foundation
+# OpenRC Makefile
+# Copyright 2007 Roy Marples
# Distributed under the terms of the GNU General Public License v2
NAME = openrc
diff --git a/conf.d.BSD/net.example b/conf.d.BSD/net.example
index 1cd31e61..31d61055 100644
--- a/conf.d.BSD/net.example
+++ b/conf.d.BSD/net.example
@@ -1,7 +1,3 @@
-# BSD NOTE: Network functionality support is still being written and
-# many parts here are missing compared to Gentoo/Linux
-# Feel free to write the needed modules and submit them to us :)
-#
##############################################################################
# QUICK-START
#
diff --git a/conf.d/local b/conf.d/local
new file mode 100644
index 00000000..97dbbccd
--- /dev/null
+++ b/conf.d/local
@@ -0,0 +1,18 @@
+# Here is where you can put anything you need to start
+# that there is not an init script for.
+
+local_start() {
+ # This is a good place to load any misc programs
+ # on startup (use &>/dev/null to hide output)
+
+ # We should always return 0
+ return 0
+}
+
+local_stop() {
+ # This is a good place to unload any misc.
+ # programs you started above.
+
+ # We should always return 0
+ return 0
+}
diff --git a/conf.d/local.start b/conf.d/local.start
deleted file mode 100644
index 7a20c142..00000000
--- a/conf.d/local.start
+++ /dev/null
@@ -1,5 +0,0 @@
-# /etc/conf.d/local.start
-
-# This is a good place to load any misc programs
-# on startup (use &>/dev/null to hide output)
-
diff --git a/conf.d/local.stop b/conf.d/local.stop
deleted file mode 100644
index 7dc89f63..00000000
--- a/conf.d/local.stop
+++ /dev/null
@@ -1,8 +0,0 @@
-# /etc/conf.d/local.stop
-
-# This is a good place to unload any misc.
-# programs you started above.
-# For example, if you are using OSS and have
-# "/usr/local/bin/soundon" above, put
-# "/usr/local/bin/soundoff" here.
-
diff --git a/etc.BSD/rc b/etc.BSD/rc
index 579770a1..39b84526 100644
--- a/etc.BSD/rc
+++ b/etc.BSD/rc
@@ -1,5 +1,4 @@
#!/bin/sh
-# Copyright 2006-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/etc.BSD/rc.shutdown b/etc.BSD/rc.shutdown
index 26a91a2f..691e94ad 100644
--- a/etc.BSD/rc.shutdown
+++ b/etc.BSD/rc.shutdown
@@ -1,5 +1,4 @@
#!/bin/sh
-# Copyright 2006-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/clock b/init.d.BSD/clock
index d6dc8b5c..85b47fa8 100755
--- a/init.d.BSD/clock
+++ b/init.d.BSD/clock
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/devd b/init.d.BSD/devd
index ffd77f02..78ce9256 100644
--- a/init.d.BSD/devd
+++ b/init.d.BSD/devd
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/dumpon b/init.d.BSD/dumpon
index 64876ab1..505905fc 100755
--- a/init.d.BSD/dumpon
+++ b/init.d.BSD/dumpon
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/hostid b/init.d.BSD/hostid
index e91ae3a0..9df83550 100644
--- a/init.d.BSD/hostid
+++ b/init.d.BSD/hostid
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/mixer b/init.d.BSD/mixer
index 4a14c9b1..ef710ac1 100644
--- a/init.d.BSD/mixer
+++ b/init.d.BSD/mixer
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/newsyslog b/init.d.BSD/newsyslog
index ffc2aaa0..5c48ff5d 100644
--- a/init.d.BSD/newsyslog
+++ b/init.d.BSD/newsyslog
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/nscd b/init.d.BSD/nscd
index def54203..4dbeacc4 100644
--- a/init.d.BSD/nscd
+++ b/init.d.BSD/nscd
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/powerd b/init.d.BSD/powerd
index c7886942..319d9cb0 100644
--- a/init.d.BSD/powerd
+++ b/init.d.BSD/powerd
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/rarpd b/init.d.BSD/rarpd
index 16ed6de6..11804a71 100644
--- a/init.d.BSD/rarpd
+++ b/init.d.BSD/rarpd
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/rpcbind b/init.d.BSD/rpcbind
index 8a5299a9..0bf6bbc7 100644
--- a/init.d.BSD/rpcbind
+++ b/init.d.BSD/rpcbind
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/savecore b/init.d.BSD/savecore
index 053828ec..194248bd 100755
--- a/init.d.BSD/savecore
+++ b/init.d.BSD/savecore
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/sysctl b/init.d.BSD/sysctl
index 6507a09e..d4c27ee5 100644
--- a/init.d.BSD/sysctl
+++ b/init.d.BSD/sysctl
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.BSD/syslogd b/init.d.BSD/syslogd
index aa1533d5..8ce97ae4 100644
--- a/init.d.BSD/syslogd
+++ b/init.d.BSD/syslogd
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.Linux/clock b/init.d.Linux/clock
index b8b17a97..4e9df321 100755
--- a/init.d.Linux/clock
+++ b/init.d.Linux/clock
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -34,6 +33,15 @@ clock_adjfile=${clock_adjfile:-${CLOCK_ADJFILE}}
clock_args=${clock_args:-${CLOCK_OPTS}}
clock_systohc=${clock_systohc:-${CLOCK_SYSTOHC}}
+clock=${clock:-${CLOCK:-UTC}}
+if [ "${clock}" = "UTC" ]; then
+ utc="UTC"
+ utc_cmd="--utc"
+else
+ utc="Local Time"
+ utc_cmd="--localtime"
+fi
+
depend() {
if yesno ${clock_adjfile}; then
use checkroot
@@ -46,49 +54,46 @@ setupopts() {
utc=
case "${RC_SYS}" in
UML|VPS|XEN)
- TBLURB="${RC_SYS}"
+ utc="${RC_SYS}"
;;
*)
case "$(uname -m)" in
s390*)
- TBLURB="s390"
+ utc="s390"
;;
*)
if [ -e /proc/devices ] && grep -q " cobd$" /proc/devices; then
- TBLURB="coLinux"
- elif [ "${CLOCK}" = "UTC" ]; then
- utc="--utc"
- TBLURB="UTC"
- else
- utc="--localtime"
- TBLURB="Local Time"
+ utc="coLinux"
fi
;;
esac
;;
esac
- [ -n "${utc}" ] || return 0
+
+ case "${utc}" in
+ UTC|Local" "Time);;
+ *) unset utc_cmd;;
+ esac
}
start() {
- local utc= TBLURB= errstr="" retval=0
-
+ local retval=0 errstr=""
setupopts
- ebegin "Setting system clock using the hardware clock [${TBLURB}]"
- if [ -n "${utc}" ]; then
+ ebegin "Setting system clock using the hardware clock [${utc}]"
+ if [ -n "${utc_cmd}" ]; then
if [ -e /proc/modules -a ! -e /dev/rtc ]; then
modprobe -q rtc || modprobe -q genrtc
fi
# Since hwclock always exit's with a 0, need to check its output.
if [ -e /etc/adjtime ] && yesno ${clock_adjfile}; then
- errstr="$(hwclock --adjust ${utc} 2>&1 >/dev/null)"
+ errstr="$(hwclock --adjust ${utc_cmd} 2>&1 >/dev/null)"
fi
# If setting UTC, don't bother to run hwclock when first booting
# as that's the default
- if [ "${PREVLEVEL}" != "N" -o "${utc}" != "--utc" -o -n "${clock_args}" ]; then
- errstr="${errstr}$(hwclock --hctosys ${utc} ${clock_args} 2>&1 >/dev/null)"
+ if [ "${PREVLEVEL}" != "N" -o "${utc_cmd}" != "--utc" -o -n "${clock_args}" ]; then
+ errstr="${errstr}$(hwclock --hctosys ${utc_cmd} ${clock_args} 2>&1 >/dev/null)"
fi
fi
if [ -n "${errstr}" ]; then
@@ -106,19 +111,18 @@ stop() {
[ -n "${CDBOOT}" ] && return 0
yesno ${clock_systohc} || return 0
- local utc= TBLURB= errstr="" retval=0
-
+ local retval=0 errstr=""
setupopts
- ebegin "Setting hardware clock using the system clock" "[${TBLURB}]"
- if [ -n "${utc}" ]; then
+ ebegin "Setting hardware clock using the system clock" "[${utc}]"
+ if [ -n "${utc_cmd}" ]; then
if ! yesno "${clock_adjfile}"; then
# Some implementations don't handle adjustments
if LC_ALL=C hwclock --help | grep -q "\-\-noadjfile"; then
- utc="${utc} --noadjfile"
+ utc_cmd="${utc_cmd} --noadjfile"
fi
fi
- errstr="$(LC_ALL=C hwclock --systohc ${utc} ${clock_args} 2>&1 >/dev/null)"
+ errstr="$(LC_ALL=C hwclock --systohc ${utc_cmd} ${clock_args} 2>&1 >/dev/null)"
fi
if [ -n "${errstr}" ]; then
ewarn "${errstr}"
@@ -134,9 +138,8 @@ save() {
}
show() {
- local utc= TBLURB=
setupopts
- /sbin/hwclock --show "${utc}" ${clock_args}
+ hwclock --show "${utc_cmd}" ${clock_args}
}
# vim: set ts=4 :
diff --git a/init.d.Linux/consolefont b/init.d.Linux/consolefont
index 1176584b..c1a4755a 100755
--- a/init.d.Linux/consolefont
+++ b/init.d.Linux/consolefont
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -52,12 +51,12 @@ start() {
fi
if [ "${ttyn}" = 0 ]; then
- ebegin "Skipping font setup (rc_tty_number == 0); you should disable this init.d"
+ ebegin "Skipping font setup (rc_tty_number == 0)"
eend 0
return 0
fi
- local x= param= sf_param= retval=1
+ local x= param= sf_param= retval=1 ttydev=
# Get additional parameters
if [ -n "${consoletranslation}" ]; then
@@ -68,40 +67,18 @@ start() {
fi
# Set the console font
- local errmsg=
ebegin "Setting user font"
- if [ -x /bin/setfont ]; then
- # We patched setfont to have --tty support ...
- if [ -n "$(setfont --help 2>&1 | grep -e '--tty')" ] || \
- [ -n "$(setfont --help 2>&1 | grep -e '-C')" ]
- then
- if [ -n "$(setfont --help 2>&1 | grep -e '--tty')" ]; then
- sf_param="--tty="
- else
- sf_param="-C "
- fi
- local ttydev=
- [ -d /dev/vc ] \
- && ttydev=/dev/vc/ \
- || ttydev=/dev/tty
-
- x=1
- while [ ${x} -le ${ttyn} ]; do
- /bin/setfont ${consolefont} ${param} \
- ${sf_param}/${ttydev}${x} > /dev/null
- retval=$?
- x=$((${x} + 1))
- done
- else
- /bin/setfont ${consolefont} ${param} > /dev/null
- retval=$?
- fi
- errmsg="Failed to set user font"
- else
- retval=1
- errmsg="/bin/setfont not found"
- fi
- eend ${retval} "${errmsg}"
+ [ -d /dev/vc ] \
+ && ttydev=/dev/vc/ \
+ || ttydev=/dev/tty
+
+ x=1
+ while [ ${x} -le ${ttyn} ]; do
+ setfont ${consolefont} ${param}-C ${ttydev}${x} >/dev/null
+ retval=$((${retval} + $?))
+ x=$((${x} + 1))
+ done
+ eend ${retval}
# Store the last font so we can use it ASAP on boot
if [ ${retval} -eq 0 -a -w "${RC_LIBDIR}" ]; then
@@ -111,7 +88,7 @@ start() {
cp "${font}" "${RC_LIBDIR}"/console
echo "$(basename "${font}")" > "${RC_LIBDIR}"/console/font
if yesno ${unicode:-${UNICODE}}; then
- printf "" > "${RC_LIBDIR}"/console/unicode
+ cp /dev/null "${RC_LIBDIR}"/console/unicode
else
rm -f "${RC_LIBDIR}"/console/unicode
fi
diff --git a/init.d.Linux/keymaps b/init.d.Linux/keymaps
index 2960fee7..014024b5 100755
--- a/init.d.Linux/keymaps
+++ b/init.d.Linux/keymaps
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -74,18 +73,13 @@ start() {
fi
ebegin "Loading key mappings"
- if [ -x /bin/loadkeys ]; then
- yesno ${windowskeys} && wkeys="windowkeys"
- loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
- eend $? "Error loading key mappings"
+ yesno ${windowskeys} && wkeys="windowkeys"
+ loadkeys -q ${loadkeys_uni} ${wkeys} ${keymap} ${extended_keymaps}
+ eend $? "Error loading key mappings" || return $?
- if yesno ${fix_euro}; then
- # Fix some fonts displaying the Euro, #173528.
- echo "altgr keycode 18 = U+20AC" | loadkeys -q
- fi
- else
- eend 1 "/bin/loadkeys not found"
- return 1
+ if yesno ${fix_euro}; then
+ # Fix some fonts displaying the Euro, #173528.
+ echo "altgr keycode 18 = U+20AC" | loadkeys -q
fi
# Set terminal encoding to either ASCII or UNICODE.
diff --git a/init.d.Linux/numlock b/init.d.Linux/numlock
index 672839b1..329153bd 100755
--- a/init.d.Linux/numlock
+++ b/init.d.Linux/numlock
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.Linux/procfs b/init.d.Linux/procfs
index 4a3778a3..85de863b 100644
--- a/init.d.Linux/procfs
+++ b/init.d.Linux/procfs
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.Linux/sysctl b/init.d.Linux/sysctl
index 9ee59ef7..2cac1019 100644
--- a/init.d.Linux/sysctl
+++ b/init.d.Linux/sysctl
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.misc/dnsmasq b/init.d.misc/dnsmasq
index f4ff121b..05e75d59 100644
--- a/init.d.misc/dnsmasq
+++ b/init.d.misc/dnsmasq
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d.misc/sshd b/init.d.misc/sshd
index e02a8dbd..5e99cf7b 100644
--- a/init.d.misc/sshd
+++ b/init.d.misc/sshd
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d/bootmisc b/init.d/bootmisc
index 5aa5f200..72254f11 100755
--- a/init.d/bootmisc
+++ b/init.d/bootmisc
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -70,13 +69,6 @@ cleanup_tmp_dir() {
}
start() {
- # Put a nologin file in /etc to prevent people from logging
- # in before system startup is complete.
- if yesno ${delay_login:-${DELAYLOGIN}}; then
- echo "System bootup in progress - please wait" > /etc/nologin
- cp /etc/nologin /etc/nologin.boot
- fi
-
if ! mkdir /.test.$$ 2>/dev/null; then
ewarn "Skipping /var and /tmp initialization (ro root?)"
return 0
@@ -94,8 +86,8 @@ start() {
done
ebegin "Creating user login records"
- printf "" >/var/run/utmp
- [ -e /var/log/wtmp ] || printf "" >/var/log/wtmp
+ cp /dev/null /var/run/utmp
+ [ -e /var/log/wtmp ] || cp /dev/null /var/log/wtmp
chmod 0644 /var/run/utmp /var/log/wtmp
eend 0
@@ -134,9 +126,6 @@ start() {
dmesg > /var/log/dmesg
chmod 640 /var/log/dmesg
fi
-
- # Check for /etc/resolv.conf, and create if missing
- [ -e /etc/resolv.conf ] || printf "" >/etc/resolv.conf
}
stop() {
diff --git a/init.d/checkfs b/init.d/checkfs
index c29c519a..8e8c6ffc 100755
--- a/init.d/checkfs
+++ b/init.d/checkfs
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -37,17 +36,15 @@ do_checkfs() {
local retval=0 mode="-p" opts= parts=
ebegin "Checking all filesystems"
-
- if [ -e /forcefsck ] || get_bootparam "forcefsck"; then
- ewarn "A full fsck has been forced"
- mode="-f -n"
- fi
if [ "${RC_UNAME}" = "Linux" ]; then
opts="-A -C0 -R -T"
else
parts="$(fstabinfo --passno ">1")"
- [ -z "${parts}" ] && return 0
+ if [ -z "${parts}" ]; then
+ eend 0
+ return 0
+ fi
fi
fsck ${opts} ${mode} ${parts}
@@ -77,8 +74,6 @@ do_checkfs() {
fi
fi
- [ ${retval} = 0 -a -e /forcefsck ] && rm /forcefsck
-
return ${retval}
}
@@ -89,7 +84,7 @@ start() {
stop() {
# fsck on shutdown if we need to
if yesno "${fsck_shutdown:-${FSCK_SHUTDOWN}}"; then
- [ ! -f /forcefsck ] && do_checkfs
+ do_checkfs
fi
return 0
}
diff --git a/init.d/checkroot b/init.d/checkroot
index acfb914a..ef491847 100755
--- a/init.d/checkroot
+++ b/init.d/checkroot
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -33,8 +32,8 @@ depend() {
do_mtab() {
# Don't create mtab if /etc is readonly
- if ! printf "" 2>/dev/null >/etc/mtab; then
- ewarn "Skipping /etc/mtab initialization (ro root?)"
+ if ! cp /dev/null >/etc/mtab 2>/dev/null; then
+ ewarn "Skipping /etc/mtab initialization (ro root)"
return 0
fi
ebegin "Updating /etc/mtab"
@@ -75,23 +74,15 @@ do_fsck() {
root=$(fstabinfo --blockdevice /)
[ ! -e "${root}" -a -e /dev/root ] && root=/dev/root
- if [ -e /forcefsck ] || get_bootparam "forcefsck"; then
- ebegin "Checking root filesystem (full fsck forced)"
- fsck ${opts} -f -n "${root}"
- # /forcefsck isn't deleted because checkfs needs it.
- # it'll be deleted in that script.
+ # Obey the fs_passno setting for / (see fstab(5))
+ local pass=$(fstabinfo --passno /)
+ if [ ${pass:-0} != "0" ]; then
+ ebegin "Checking root filesystem"
+ fsck ${opts} -p "${root}"
retval=$?
else
- # Obey the fs_passno setting for / (see fstab(5))
- local pass=$(fstabinfo --passno /)
- if [ ${pass:-0} != "0" ]; then
- ebegin "Checking root filesystem"
- fsck ${opts} -p "${root}"
- retval=$?
- else
- ebegin "Skipping root filesystem check" "(fstab's passno == 0)"
- retval=0
- fi
+ ebegin "Skipping root filesystem check (fstab's passno == 0)"
+ retval=0
fi
if [ ${retval} -eq 0 ]; then
diff --git a/init.d/halt.sh b/init.d/halt.sh
index aa73a6d0..a439b834 100755
--- a/init.d/halt.sh
+++ b/init.d/halt.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -109,22 +108,6 @@ if [ "${RC_UNAME}" = "Linux" ]; then
unmounted=$?
fi
-# This UPS code should be moved to out of here and to an addon
-if [ -f /etc/killpower ]; then
- UPS_CTL=/sbin/upsdrvctl
- UPS_POWERDOWN="${UPS_CTL} shutdown"
-elif [ -f /etc/apcupsd/powerfail ]; then
- UPS_CTL=/etc/apcupsd/apccontrol
- UPS_POWERDOWN="${UPS_CTL} killpower"
-fi
-if [ -x "${UPS_CTL}" ]; then
- ewarn "Signalling ups driver(s) to kill the load!"
- ${UPS_POWERDOWN}
- ewarn "Halt system and wait for the UPS to kill our power"
- halt -id
- sleep 60
-fi
-
if [ ${unmounted} -ne 0 ]; then
[ -x /sbin/sulogin ] && sulogin -t 10 /dev/console
exit 1
diff --git a/init.d/hostname b/init.d/hostname
index 688c0421..d371abef 100755
--- a/init.d/hostname
+++ b/init.d/hostname
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d/local b/init.d/local
index d1c30d40..0873ac8e 100755
--- a/init.d/local
+++ b/init.d/local
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -24,8 +23,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-description="Executes user command in /etc/conf.d/local.start when starting \
-and /etc/conf.d/local.stop when stopping."
+description="Executes user commands in /etc/conf.d/local"
depend() {
after *
@@ -35,8 +33,11 @@ depend() {
start() {
ebegin "Starting local"
- # Add any misc programs that should be started
- # to /etc/conf.d/local.start
+ if type local_start >/dev/null 2>&1; then
+ local_start
+ fi
+
+ # Support old configs
if [ -e /etc/conf.d/local.start ]; then
. /etc/conf.d/local.start
fi
@@ -47,8 +48,11 @@ start() {
stop() {
ebegin "Stopping local"
- # Add any misc programs that should be stopped
- # to /etc/conf.d/local.stop
+ if type local_start >/dev/null 2>&1; then
+ local_stop
+ fi
+
+ # Support old configs
if [ -e /etc/conf.d/local.stop ]; then
. /etc/conf.d/local.stop
fi
diff --git a/init.d/localmount b/init.d/localmount
index d05822ec..e60ad019 100755
--- a/init.d/localmount
+++ b/init.d/localmount
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/init.d/netmount b/init.d/netmount
index df6e0c99..e2a3d44d 100755
--- a/init.d/netmount
+++ b/init.d/netmount
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -27,11 +26,12 @@
description="Mounts network shares according to /etc/fstab."
need_portmap() {
- local mnt opts ret IFS="
+ local opts=
+ local IFS="
"
- set -- $(fstabinfo --fstype nfs,nfs4)
- for mnt; do
- case ,$(fstabinfo --options "${mnt}"), in
+ set -- $(fstabinfo --options --fstype nfs,nfs4)
+ for opts; do
+ case ,${opts}, in
*,noauto,*|*,nolock,*);;
*) return 0;;
esac
@@ -79,7 +79,7 @@ start() {
ebegin "Mounting network filesystems"
mount -at ${fs}
- ewend $? "Could not mount all network filesystems!"
+ ewend $? "Could not mount all network filesystems"
return 0
}
diff --git a/init.d/rmnologin b/init.d/rmnologin
deleted file mode 100755
index 925ddcaf..00000000
--- a/init.d/rmnologin
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
-# Copyright 2007 Roy Marples
-# All rights reserved
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-
-description="Removes a file which blocks logins until this service has run."
-
-depend() {
- need localmount
- after bootmisc net
-}
-
-start() {
- if [ -f /etc/nologin.boot ]; then
- rm -f /etc/nologin /etc/nologin.boot
- fi
-}
-
-# vim: set ts=4 :
diff --git a/init.d/urandom b/init.d/urandom
index 5d3a8404..dccdf304 100755
--- a/init.d/urandom
+++ b/init.d/urandom
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -58,8 +57,6 @@ start() {
stop() {
ebegin "Saving random seed"
- # Carry a random seed from shut-down to start-up;
- # see documentation in linux/drivers/char/random.c
save_seed
eend $? "Failed to save random seed"
}
diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh
index ff8b68d6..d8957e95 100644
--- a/net.BSD/ifconfig.sh
+++ b/net.BSD/ifconfig.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.BSD/iwconfig.sh b/net.BSD/iwconfig.sh
index 6d670633..512dea61 100644
--- a/net.BSD/iwconfig.sh
+++ b/net.BSD/iwconfig.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/apipa.sh b/net.Linux/apipa.sh
index 42e85f5d..8a1653be 100644
--- a/net.Linux/apipa.sh
+++ b/net.Linux/apipa.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/arping.sh b/net.Linux/arping.sh
index d173465b..25fa3ab5 100644
--- a/net.Linux/arping.sh
+++ b/net.Linux/arping.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/bonding.sh b/net.Linux/bonding.sh
index 617f76f6..433778d9 100644
--- a/net.Linux/bonding.sh
+++ b/net.Linux/bonding.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/br2684ctl.sh b/net.Linux/br2684ctl.sh
index b3f186e4..3b76a069 100644
--- a/net.Linux/br2684ctl.sh
+++ b/net.Linux/br2684ctl.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/bridge.sh b/net.Linux/bridge.sh
index 12c77768..c4c62d89 100644
--- a/net.Linux/bridge.sh
+++ b/net.Linux/bridge.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/ccwgroup.sh b/net.Linux/ccwgroup.sh
index ed70bb54..461b306d 100644
--- a/net.Linux/ccwgroup.sh
+++ b/net.Linux/ccwgroup.sh
@@ -1,4 +1,3 @@
-# Copyright 2006-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/ifconfig.sh b/net.Linux/ifconfig.sh
index 04a9ec1e..ff5c5437 100644
--- a/net.Linux/ifconfig.sh
+++ b/net.Linux/ifconfig.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/ifplugd.sh b/net.Linux/ifplugd.sh
index 58edffc7..f6e3260d 100644
--- a/net.Linux/ifplugd.sh
+++ b/net.Linux/ifplugd.sh
@@ -1,4 +1,3 @@
-# Copyright 2005-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/ip6to4.sh b/net.Linux/ip6to4.sh
index 77b7de10..d428c4ac 100644
--- a/net.Linux/ip6to4.sh
+++ b/net.Linux/ip6to4.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/ipppd.sh b/net.Linux/ipppd.sh
index 4e113927..60938842 100644
--- a/net.Linux/ipppd.sh
+++ b/net.Linux/ipppd.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/iproute2.sh b/net.Linux/iproute2.sh
index 3d4224f6..ca9c1566 100644
--- a/net.Linux/iproute2.sh
+++ b/net.Linux/iproute2.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/iwconfig.sh b/net.Linux/iwconfig.sh
index 366071e4..cb94912a 100644
--- a/net.Linux/iwconfig.sh
+++ b/net.Linux/iwconfig.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/netplugd.sh b/net.Linux/netplugd.sh
index b1460b96..0be5e938 100644
--- a/net.Linux/netplugd.sh
+++ b/net.Linux/netplugd.sh
@@ -1,4 +1,3 @@
-# Copyright 2005-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/pump.sh b/net.Linux/pump.sh
index 9e0fee0d..75c981ba 100644
--- a/net.Linux/pump.sh
+++ b/net.Linux/pump.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/tuntap.sh b/net.Linux/tuntap.sh
index 3979fc1b..07aa2a54 100644
--- a/net.Linux/tuntap.sh
+++ b/net.Linux/tuntap.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/udhcpc.sh b/net.Linux/udhcpc.sh
index 2e887b6e..468d0561 100644
--- a/net.Linux/udhcpc.sh
+++ b/net.Linux/udhcpc.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net.Linux/vlan.sh b/net.Linux/vlan.sh
index 28bd1974..ec07561c 100644
--- a/net.Linux/vlan.sh
+++ b/net.Linux/vlan.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net/dhclient.sh b/net/dhclient.sh
index a59fb3bc..ef689337 100644
--- a/net/dhclient.sh
+++ b/net/dhclient.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -36,10 +35,10 @@ dhclient_start() {
local sendhost=true dconf=
# Get our options
+ # These options only work in Gentoo, and maybe RedHat
eval opts=\$dhcp_${IFVAR}
[ -z "${opts}" ] && opts=${dhcp}
- # Map some generic options to dhcpcd
for opt in ${opts}; do
case "${opt}" in
nodns) args="${args} -e PEER_DNS=no";;
diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh
index d07295a8..1878a9c0 100644
--- a/net/dhcpcd.sh
+++ b/net/dhcpcd.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net/macchanger.sh b/net/macchanger.sh
index 825ede1d..b94a9bf4 100644
--- a/net/macchanger.sh
+++ b/net/macchanger.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -46,9 +45,10 @@ macchanger_pre_start() {
_down
mac=$(echo "${mac}" | tr '[:upper:]' '[:lower:]')
+ local hex="[0-9a-f][0-9a-f]"
case "${mac}" in
- # specific mac-addr, i wish there were a shorter way to specify this
- [0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f]:[0-9a-f][0-9a-f])
+ # specific mac-addr
+ ${hex}:${hex}:${hex}:${hex}:${hex}:${hex})
# We don't need macchanger to change to a specific mac address
_set_mac_address "${mac}"
if eend "$?"; then
diff --git a/net/macnet.sh b/net/macnet.sh
index a1fbb66d..936ff109 100644
--- a/net/macnet.sh
+++ b/net/macnet.sh
@@ -1,4 +1,3 @@
-# Copyright 2005-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net/ssidnet.sh b/net/ssidnet.sh
index 2012341c..f0f2e4fa 100644
--- a/net/ssidnet.sh
+++ b/net/ssidnet.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/net/system.sh b/net/system.sh
index c44e7099..cbb30715 100644
--- a/net/system.sh
+++ b/net/system.sh
@@ -1,4 +1,3 @@
-# Copyright 2005-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
@@ -89,9 +88,6 @@ _system_ntp() {
buffer="${buffer}server ${x}\n"
done
- buffer="${buffer}driftfile /var/lib/ntp/ntp.drift\n"
- buffer="${buffer}logfile /var/log/ntp.log\n"
-
printf "${buffer}" > /etc/ntp.conf
chmod 644 /etc/ntp.conf
}
diff --git a/net/wpa_supplicant.sh b/net/wpa_supplicant.sh
index 7daa2c59..5b241629 100644
--- a/net/wpa_supplicant.sh
+++ b/net/wpa_supplicant.sh
@@ -1,4 +1,3 @@
-# Copyright 2004-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/sh.BSD/init.sh b/sh.BSD/init.sh
index af712181..2133fce7 100755
--- a/sh.BSD/init.sh
+++ b/sh.BSD/init.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/sh.Linux/init-early.sh b/sh.Linux/init-early.sh
index 8e0af34e..73855c3b 100755
--- a/sh.Linux/init-early.sh
+++ b/sh.Linux/init-early.sh
@@ -1,5 +1,4 @@
#!/bin/sh
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh
index 524e7538..dc9ee5d6 100755
--- a/sh.Linux/init.sh
+++ b/sh.Linux/init.sh
@@ -109,6 +109,24 @@ get_KV() {
return $?
}
+KV_to_int() {
+ [ -z $1 ] && return 1
+
+ local x=${1%%-*}
+ local KV_MAJOR=${x%%.*}
+ x=${x#*.}
+ local KV_MINOR=${x%%.*}
+ x=${x#*.}
+ local KV_MICRO=${x%%.*}
+ local KV_int=$((${KV_MAJOR} * 65536 + ${KV_MINOR} * 256 + ${KV_MICRO} ))
+
+ # We make version 2.2.0 the minimum version we will handle as
+ # a sanity check ... if its less, we fail ...
+ [ "${KV_int}" -lt 131584 ] && return 1
+
+ echo "${KV_int}"
+}
+
. /etc/init.d/functions.sh
. "${RC_LIBDIR}"/sh/init-functions.sh
. "${RC_LIBDIR}"/sh/rc-functions.sh
diff --git a/sh/functions.sh b/sh/functions.sh
index 4c8843e8..f6c51f89 100644
--- a/sh/functions.sh
+++ b/sh/functions.sh
@@ -1,4 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Allow any sh script to work with einfo functions and friends
+# We also provide a few helpful functions for other programs to use
+
# Copyright 2007 Roy Marples
# All rights reserved
@@ -37,70 +39,6 @@ eoutdent() {
return 0
}
-# Safer way to list the contents of a directory,
-# as it do not have the "empty dir bug".
-#
-# char *dolisting(param)
-#
-# print a list of the directory contents
-#
-# NOTE: quote the params if they contain globs.
-# also, error checking is not that extensive ...
-#
-dolisting() {
- local x= y= mylist= mypath="$*"
-
- # Here we use file globbing instead of ls to save on forking
- for x in ${mypath}; do
- [ ! -e "${x}" ] && continue
-
- if [ -L "${x}" -o -f "${x}" ]; then
- mylist="${mylist} "${x}
- elif [ -d "${x}" ]; then
- [ "${x%/}" != "${x}" ] && x=${x%/}
-
- for y in "${x}"/*; do
- [ -e "${y}" ] && mylist="${mylist} ${y}"
- done
- fi
- done
-
- echo "${mylist# *}"
-}
-
-# bool is_older_than(reference, files/dirs to check)
-#
-# return 0 if any of the files/dirs are newer than
-# the reference file
-#
-# EXAMPLE: if is_older_than a.out *.o; then ...
-is_older_than() {
- local x= ref="$1"
- shift
-
- for x; do
- [ -e "${x}" ] || continue
- # We need to check the mtime if it's a directory too as the
- # contents may have changed.
- [ "${x}" -nt "${ref}" ] && return 0
- [ -d "${x}" ] && is_older_than "${ref}" "${x}"/* && return 0
- done
-
- return 1
-}
-
-uniqify() {
- local result=
- while [ -n "$1" ]; do
- case " ${result} " in
- *" $1 "*);;
- *) result="${result} $1";;
- esac
- shift
- done
- echo "${result# *}"
-}
-
yesno()
{
[ -z "$1" ] && return 1
@@ -119,24 +57,6 @@ yesno()
esac
}
-KV_to_int() {
- [ -z $1 ] && return 1
-
- local x=${1%%-*}
- local KV_MAJOR=${x%%.*}
- x=${x#*.}
- local KV_MINOR=${x%%.*}
- x=${x#*.}
- local KV_MICRO=${x%%.*}
- local KV_int=$((${KV_MAJOR} * 65536 + ${KV_MINOR} * 256 + ${KV_MICRO} ))
-
- # We make version 2.2.0 the minimum version we will handle as
- # a sanity check ... if its less, we fail ...
- [ "${KV_int}" -lt 131584 ] && return 1
-
- echo "${KV_int}"
-}
-
_sanitize_path() {
local IFS=":" p= path=
for p in ${PATH}; do
@@ -151,12 +71,10 @@ _sanitize_path() {
# Allow our scripts to support zsh
if [ -n "${ZSH_VERSION}" ]; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
+ emulate sh
+ NULLCMD=:
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
fi
# Add our bin to $PATH
diff --git a/sh/gendepends.sh b/sh/gendepends.sh
index f6c6edb4..b162e750 100755
--- a/sh/gendepends.sh
+++ b/sh/gendepends.sh
@@ -1,7 +1,6 @@
#!/bin/sh
# Shell wrapper to list our dependencies
-# Copyright 2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/sh/init-common-post.sh b/sh/init-common-post.sh
index 8e3e4b54..b5607631 100644
--- a/sh/init-common-post.sh
+++ b/sh/init-common-post.sh
@@ -1,4 +1,3 @@
-# Copyright 2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/sh/net.sh b/sh/net.sh
index a39c28bf..07ac1c20 100755
--- a/sh/net.sh
+++ b/sh/net.sh
@@ -1,5 +1,4 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/sh/rc-mount.sh b/sh/rc-mount.sh
index 19f469e0..ddfe5223 100644
--- a/sh/rc-mount.sh
+++ b/sh/rc-mount.sh
@@ -1,4 +1,3 @@
-# Copyright 2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/sh/runscript.sh b/sh/runscript.sh
index 9ad22d45..a3b3cdc3 100755
--- a/sh/runscript.sh
+++ b/sh/runscript.sh
@@ -1,7 +1,6 @@
#!/bin/sh
# Shell wrapper for runscript
-# Copyright 1999-2007 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
diff --git a/src/Makefile b/src/Makefile
index 05b3cbe1..a103679b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,4 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
+# Copyright 2007 Roy Marples
# We should strive to keep this Makefile working with the default make
# shipped with the OS's we support. Mainly because I'm lazy and just want
diff --git a/src/_usage.c b/src/_usage.c
index aa5a1ae8..088ccb48 100644
--- a/src/_usage.c
+++ b/src/_usage.c
@@ -1,5 +1,4 @@
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/_usage.h b/src/_usage.h
index 6ee391ae..ba09255c 100644
--- a/src/_usage.h
+++ b/src/_usage.h
@@ -1,5 +1,4 @@
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/builtins.h b/src/builtins.h
index 1e7a5348..c0048eb6 100644
--- a/src/builtins.h
+++ b/src/builtins.h
@@ -1,5 +1,4 @@
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/checkown.c b/src/checkown.c
index 2b7069b9..e90c24ac 100644
--- a/src/checkown.c
+++ b/src/checkown.c
@@ -5,7 +5,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/einfo.h b/src/einfo.h
index 990ae6fd..dadb028d 100644
--- a/src/einfo.h
+++ b/src/einfo.h
@@ -1,5 +1,4 @@
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/fstabinfo.c b/src/fstabinfo.c
index 9888fff7..a6ffe966 100644
--- a/src/fstabinfo.c
+++ b/src/fstabinfo.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/hidden-visibility.h b/src/hidden-visibility.h
index ca2771a7..bc7e338a 100644
--- a/src/hidden-visibility.h
+++ b/src/hidden-visibility.h
@@ -1,27 +1,6 @@
/*
- * Copyright 2007 Gentoo Foundation
- * All rights reserved
-
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
+ * Written by Mike Frysinger
+ * Placed in the Public Domain
*/
#ifndef _HIDDEN_VISIBILITY_H_
diff --git a/src/libeinfo.c b/src/libeinfo.c
index 8aeea774..1ffa35eb 100644
--- a/src/libeinfo.c
+++ b/src/libeinfo.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
@@ -30,8 +29,7 @@
* SUCH DAMAGE.
*/
-const char copyright[] = "Copyright (c) 2007 Gentoo Foundation\n"
- "Copyright (c) 2007 Roy Marples";
+const char copyright[] = "Copyright (c) 2007 Roy Marples";
#include <sys/types.h>
#include <sys/ioctl.h>
diff --git a/src/librc-daemon.c b/src/librc-daemon.c
index e7e66b92..30853f26 100644
--- a/src/librc-daemon.c
+++ b/src/librc-daemon.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/librc-depend.c b/src/librc-depend.c
index e870c73c..a8e03bb0 100644
--- a/src/librc-depend.c
+++ b/src/librc-depend.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/librc-depend.h b/src/librc-depend.h
index 71ae1e80..238f70d1 100644
--- a/src/librc-depend.h
+++ b/src/librc-depend.h
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/librc-misc.c b/src/librc-misc.c
index 4df05ecf..dcecc293 100644
--- a/src/librc-misc.c
+++ b/src/librc-misc.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/librc-strlist.c b/src/librc-strlist.c
index e0f3e1de..815c8370 100644
--- a/src/librc-strlist.c
+++ b/src/librc-strlist.c
@@ -6,7 +6,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/librc.c b/src/librc.c
index 61f91525..9330a304 100644
--- a/src/librc.c
+++ b/src/librc.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
@@ -30,8 +29,7 @@
* SUCH DAMAGE.
*/
-const char copyright[] = "Copyright (c) 2007 Gentoo Foundation\n"
- "Copyright (c) 2007 Roy Marples";
+const char copyright[] = "Copyright (c) 2007 Roy Marples";
#include "librc.h"
diff --git a/src/librc.h b/src/librc.h
index f3ebd596..cf61217a 100644
--- a/src/librc.h
+++ b/src/librc.h
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/mountinfo.c b/src/mountinfo.c
index 09003d4a..3e471e49 100644
--- a/src/mountinfo.c
+++ b/src/mountinfo.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-depend.c b/src/rc-depend.c
index de0125fc..8c61d888 100644
--- a/src/rc-depend.c
+++ b/src/rc-depend.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-logger.c b/src/rc-logger.c
index 1cab3221..675a4d23 100644
--- a/src/rc-logger.c
+++ b/src/rc-logger.c
@@ -5,7 +5,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-logger.h b/src/rc-logger.h
index 61941d2d..c15e73f8 100644
--- a/src/rc-logger.h
+++ b/src/rc-logger.h
@@ -1,10 +1,4 @@
-/*
- rc-logger.h
- Copyright 2007 Gentoo Foundation
- */
-
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-misc.c b/src/rc-misc.c
index 7c88477d..b46e2273 100644
--- a/src/rc-misc.c
+++ b/src/rc-misc.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-misc.h b/src/rc-misc.h
index 985726d3..570d7e79 100644
--- a/src/rc-misc.h
+++ b/src/rc-misc.h
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-plugin.c b/src/rc-plugin.c
index d02f277b..613f049e 100644
--- a/src/rc-plugin.c
+++ b/src/rc-plugin.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-plugin.h b/src/rc-plugin.h
index 4f678baf..412a47e7 100644
--- a/src/rc-plugin.h
+++ b/src/rc-plugin.h
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-status.c b/src/rc-status.c
index 535f438a..bf4d63d3 100644
--- a/src/rc-status.c
+++ b/src/rc-status.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc-update.c b/src/rc-update.c
index d5f2ba92..38d48e03 100644
--- a/src/rc-update.c
+++ b/src/rc-update.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/rc.c b/src/rc.c
index ae463bed..afc41488 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -9,7 +9,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
@@ -35,8 +34,7 @@
* SUCH DAMAGE.
*/
-const char copyright[] = "Copyright (c) 2007 Gentoo Foundation\n"
- "Copyright (c) 2007 Roy Marples";
+const char copyright[] = "Copyright (c) 2007 Roy Marples";
#define APPLET "rc"
diff --git a/src/rc.h b/src/rc.h
index 6a53e7ce..776c1678 100644
--- a/src/rc.h
+++ b/src/rc.h
@@ -1,5 +1,4 @@
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/runscript.c b/src/runscript.c
index 88ce71b8..108512ae 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -4,7 +4,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/start-stop-daemon.c b/src/start-stop-daemon.c
index 1f59d986..82fa99a4 100644
--- a/src/start-stop-daemon.c
+++ b/src/start-stop-daemon.c
@@ -8,7 +8,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved
diff --git a/src/strlist.h b/src/strlist.h
index 6c15d18c..3abe44ff 100644
--- a/src/strlist.h
+++ b/src/strlist.h
@@ -5,7 +5,6 @@
*/
/*
- * Copyright 2007 Gentoo Foundation
* Copyright 2007 Roy Marples
* All rights reserved