summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-10 23:22:46 +0000
committerRoy Marples <roy@marples.name>2008-01-10 23:22:46 +0000
commit2d95c9a756c4c7b9301e04c274c3b139e0d1aef4 (patch)
tree4bd58fa2b4b8e01f5df1352ce7d06effe719b441
parent5aea880f8158945d2cc9390891de6af8ca0a9b28 (diff)
downloadopenrc-2d95c9a756c4c7b9301e04c274c3b139e0d1aef4.tar.gz
openrc-2d95c9a756c4c7b9301e04c274c3b139e0d1aef4.tar.bz2
openrc-2d95c9a756c4c7b9301e04c274c3b139e0d1aef4.tar.xz
Loads of NetBSD tweaks here.
-rw-r--r--etc.BSD/rc3
-rw-r--r--etc.BSD/rc.shutdown9
-rw-r--r--[-rwxr-xr-x]init.d.FreeBSD/clock (renamed from init.d.BSD/clock)0
-rwxr-xr-xinit.d/bootmisc5
-rw-r--r--net.BSD/ifconfig.sh2
-rw-r--r--runlevels.FreeBSD/Makefile2
-rw-r--r--runlevels.Linux/Makefile2
-rw-r--r--runlevels/Makefile2
-rw-r--r--src/libeinfo/libeinfo.c1
-rw-r--r--src/librc/librc-misc.c11
10 files changed, 19 insertions, 18 deletions
diff --git a/etc.BSD/rc b/etc.BSD/rc
index 39b8452..d1bd176 100644
--- a/etc.BSD/rc
+++ b/etc.BSD/rc
@@ -23,9 +23,6 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-# Ensure we are called by init
-[ "$PPID" = "1" ] || exit 0
-
# If $TERM is not set then assume default of cons25
# This gives us a nice colour boot :)
[ -z "$TERM" -o "$TERM" = "dumb" ] && export TERM="cons25"
diff --git a/etc.BSD/rc.shutdown b/etc.BSD/rc.shutdown
index 691e94a..6f3e852 100644
--- a/etc.BSD/rc.shutdown
+++ b/etc.BSD/rc.shutdown
@@ -23,9 +23,6 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-# Ensure we are called by init
-[ "$PPID" = "1" ] || exit 0
-
# Handle interrupts
trap : SIGINT SIGQUIT
@@ -41,8 +38,8 @@ export LD_LIBRARY_PATH="/lib${LD_LIBRARY_PATH:+:}${LDLIBRARY_PATH}"
# This block should 'translate' from the way init calls it to the way it would
# be called by sysvinit on linux.
case "$1" in
- reboot) export RUNLEVEL=6;;
- shutdown) export RUNLEVEL=0;;
- single) export RUNLEVEL=S;;
+ reboot) export RUNLEVEL=6;;
+ shutdown) export RUNLEVEL=0;;
+ single) export RUNLEVEL=S;;
esac
exec /sbin/rc "$1"
diff --git a/init.d.BSD/clock b/init.d.FreeBSD/clock
index 85b47fa..85b47fa 100755..100644
--- a/init.d.BSD/clock
+++ b/init.d.FreeBSD/clock
diff --git a/init.d/bootmisc b/init.d/bootmisc
index 72254f1..5ba1174 100755
--- a/init.d/bootmisc
+++ b/init.d/bootmisc
@@ -56,7 +56,8 @@ cleanup_tmp_dir() {
! -path "./aquota.group/*" \
! -path ./journal \
! -path "./journal/*" \
- -delete
+ -exec rm -rf -- {} \; \
+ -type d -prune
eend 0
else
ebegin "Cleaning ${dir} directory"
@@ -126,6 +127,8 @@ start() {
dmesg > /var/log/dmesg
chmod 640 /var/log/dmesg
fi
+
+ rm -f /etc/nologin
}
stop() {
diff --git a/net.BSD/ifconfig.sh b/net.BSD/ifconfig.sh
index d8957e9..438632c 100644
--- a/net.BSD/ifconfig.sh
+++ b/net.BSD/ifconfig.sh
@@ -128,7 +128,7 @@ _add_address() {
# ifconfig doesn't like CIDR addresses
case "${RC_UNAME}" in
- NetBSD|OpenBSD)
+ OpenBSD)
local ip="${1%%/*}" cidr="${1##*/}" netmask=
if [ -n "${cidr}" -a "${cidr}" != "${ip}" ]; then
netmask="$(_cidr2netmask "${cidr}")"
diff --git a/runlevels.FreeBSD/Makefile b/runlevels.FreeBSD/Makefile
index f258ba9..601cf02 100644
--- a/runlevels.FreeBSD/Makefile
+++ b/runlevels.FreeBSD/Makefile
@@ -1,4 +1,4 @@
-BOOT= dumpon hostid syscons
+BOOT= clock dumpon hostid syscons
MK= ../mk
include ${MK}/runlevels.mk
diff --git a/runlevels.Linux/Makefile b/runlevels.Linux/Makefile
index 8271bb5..0e8557b 100644
--- a/runlevels.Linux/Makefile
+++ b/runlevels.Linux/Makefile
@@ -1,4 +1,4 @@
-BOOT= consolefont keymaps modules net.lo procfs
+BOOT= clock consolefont keymaps modules net.lo procfs
DEFAULT= hdparm
MK= ../mk
diff --git a/runlevels/Makefile b/runlevels/Makefile
index 5fe0372..7737678 100644
--- a/runlevels/Makefile
+++ b/runlevels/Makefile
@@ -1,4 +1,4 @@
-BOOT= bootmisc checkroot checkfs clock hostname localmount \
+BOOT= bootmisc checkroot checkfs hostname localmount \
swap sysctl urandom
DEFAULT= local netmount
diff --git a/src/libeinfo/libeinfo.c b/src/libeinfo/libeinfo.c
index 8dfe13f..bebb3ef 100644
--- a/src/libeinfo/libeinfo.c
+++ b/src/libeinfo/libeinfo.c
@@ -177,6 +177,7 @@ static const char *const color_terms[] = {
"screen-w",
"screen.linux",
"vt100",
+ "vt220",
"xterm",
"xterm-256color",
"xterm-color",
diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c
index 4a16e9f..08f5e4e 100644
--- a/src/librc/librc-misc.c
+++ b/src/librc/librc-misc.c
@@ -151,11 +151,14 @@ char **rc_config_list (const char *file)
/* Get entry - we do not want comments */
token = strsep (&p, "#");
if (token && (strlen (token) > 1)) {
- /* Stip the newline if present */
- if (token[strlen (token) - 1] == '\n')
- token[strlen (token) - 1] = 0;
+ /* If not variable assignment then skip */
+ if (strchr (token, '=')) {
+ /* Stip the newline if present */
+ if (token[strlen (token) - 1] == '\n')
+ token[strlen (token) - 1] = 0;
- rc_strlist_add (&list, token);
+ rc_strlist_add (&list, token);
+ }
}
free (buffer);
}