aboutsummaryrefslogtreecommitdiff
path: root/init.d.NetBSD
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-25 14:06:05 +0000
committerRoy Marples <roy@marples.name>2008-03-25 14:06:05 +0000
commit55eb3794fb4ad563102d5ab30c1d5337a599b2e5 (patch)
tree0d052faeb050c1e18ba56f6f6189bff3ffca28c9 /init.d.NetBSD
parent08aff6ef44ac5dc438d916b53aa61385f6d299f3 (diff)
Rework our folder structure so that we don't have OS specific dirs, making it easier to share init and conf files per OS.
Diffstat (limited to 'init.d.NetBSD')
-rw-r--r--init.d.NetBSD/.gitignore3
-rw-r--r--init.d.NetBSD/Makefile6
-rw-r--r--init.d.NetBSD/swap-blk.in23
-rw-r--r--init.d.NetBSD/ttys.in23
-rw-r--r--init.d.NetBSD/wscons.in100
5 files changed, 0 insertions, 155 deletions
diff --git a/init.d.NetBSD/.gitignore b/init.d.NetBSD/.gitignore
deleted file mode 100644
index 70290857..00000000
--- a/init.d.NetBSD/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-swap-blk
-ttys
-wscons
diff --git a/init.d.NetBSD/Makefile b/init.d.NetBSD/Makefile
deleted file mode 100644
index 07ab1cf2..00000000
--- a/init.d.NetBSD/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-DIR= ${INITDIR}
-SRCS= swap-blk.in ttys.in wscons.in
-BIN= ${OBJS}
-
-MK= ../mk
-include ${MK}/scripts.mk
diff --git a/init.d.NetBSD/swap-blk.in b/init.d.NetBSD/swap-blk.in
deleted file mode 100644
index 4708bfff..00000000
--- a/init.d.NetBSD/swap-blk.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#!@PREFIX@/sbin/runscript
-# Copyright 2007-2008 Roy Marples <roy@marples.name>
-# All rights reserved. Released under the 2-clause BSD license.
-
-depend()
-{
- before fsck
- keyword nojail noprefix
-}
-
-start()
-{
- ebegin "Activating block swap devices"
- swapctl -A -t blk >/dev/null
- eend 0 # If swapon has nothing todo it errors, so always return 0
-}
-
-stop()
-{
- ebegin "Deactivating block swap devices"
- swapctl -U -t blk >/dev/null
- eend 0
-}
diff --git a/init.d.NetBSD/ttys.in b/init.d.NetBSD/ttys.in
deleted file mode 100644
index 8381d042..00000000
--- a/init.d.NetBSD/ttys.in
+++ /dev/null
@@ -1,23 +0,0 @@
-#!@PREFIX@/sbin/runscript
-# Copyright 2008 Roy Marples <roy@marples.name>
-# All rights reserved. Released under the 2-clause BSD license.
-
-depend()
-{
- after fsck
- keyword noprefix
-}
-
-start()
-{
- ebegin "Setting tty flags"
- ttyflags -a
- eend $? || return $?
-
- if [ -c /dev/ttyp0 ]; then
- chmod 666 /dev/tty[p-uw-zP-T][0-9a-zA-Z]
- fi
- if [ -c /dev/ttyv1 ]; then
- chmod 666 /dev/ttyv[0-9a-zA-Z]
- fi
-}
diff --git a/init.d.NetBSD/wscons.in b/init.d.NetBSD/wscons.in
deleted file mode 100644
index 15e5b56b..00000000
--- a/init.d.NetBSD/wscons.in
+++ /dev/null
@@ -1,100 +0,0 @@
-#!@PREFIX@/sbin/runscript
-# Copyright 2008 Roy Marples <roy@marples.name>
-# All rights reserved. Released under the 2-clause BSD license.
-
-depend()
-{
- need localmount
- keyword noprefix
-}
-
-start()
-{
- wscfg=/usr/sbin/wsconscfg
- wsfld=/usr/sbin/wsfontload
- wsctl=/sbin/wsconsctl
- config=/etc/wscons.conf
-
- # args mean:
- # screen idx scr emul
- # font name width height enc file
- while read type arg1 arg2 arg3 arg4 arg5; do
- case "${type}" in
- \#*|"")
- continue
- ;;
-
- font)
- cmd=${wsfld}
- [ "${arg2}" != "-" ] && cmd="${cmd} -w ${arg2}"
- [ "${arg3}" != "-" ] && cmd="${cmd} -h ${arg3}"
- [ "${arg4}" != "-" ] && cmd="${cmd} -e ${arg4}"
- cmd="${cmd} -N ${arg1} ${arg5}"
- eval "${cmd}"
- ;;
-
- screen)
- cmd=${wscfg}
- [ "${arg2}" != "-" ] && cmd="${cmd} -t ${arg2}"
- [ "${arg3}" != "-" ] && cmd="${cmd} -e ${arg3}"
- cmd="${cmd} ${arg1}"
- eval "${cmd}"
- ;;
-
- keyboard)
- cmd=${wscfg}
- case "${arg1}" in
- -|auto)
- cmd="${cmd} -k"
- ;;
- *)
- cmd="${cmd} -k ${arg1}"
- ;;
- esac
- ${cmd}
- ;;
-
- encoding)
- eval ${wsctl} -w "\"encoding=${arg1}\""
- ;;
-
- mapfile)
- local entry=
- while read entry; do
- case "${entry}" in
- \#*|"")
- continue
- ;;
- *)
- cmd="${wsctl} -w \"map+=${entry}\""
- eval "${cmd} >/dev/null"
- ;;
- esac
- done < "${arg1}"
- ;;
-
- mux)
- eval "${wscfg} -m ${arg1}"
- ;;
-
- setvar)
- case "${arg1}" in
- keyboard)
- cmd="${wsctl} -kw ${arg2}"
- ;;
- display)
- cmd="${wsctl} -dw ${arg2}"
- ;;
- mouse)
- cmd="${wsctl} -mw ${arg2}"
- ;;
- *)
- cmd="${wsctl} -w ${arg1}"
- ;;
- esac
- eval "${cmd}"
- ;;
-
- esac
- done < "${config}"
-}