summaryrefslogtreecommitdiffstats
path: root/devel/dcons/files/dcons.sh
diff options
context:
space:
mode:
authornork <nork@FreeBSD.org>2003-06-08 08:02:10 +0000
committernork <nork@FreeBSD.org>2003-06-08 08:02:10 +0000
commit7d5e8057c44f1c7f94823765d82b51624e78bec0 (patch)
tree9e8d84a2176437bef7ed1270d0511f90840e9457 /devel/dcons/files/dcons.sh
parent036dcd424f37a6a98f710eb7d59390c464ffc9cd (diff)
downloadFreeBSD-ports-7d5e8057c44f1c7f94823765d82b51624e78bec0.zip
FreeBSD-ports-7d5e8057c44f1c7f94823765d82b51624e78bec0.tar.gz
Add dcons-20030525, is Dumb CONSole device driver.
Order by:-) simokawa Submitted by: simokawa
Diffstat (limited to 'devel/dcons/files/dcons.sh')
-rw-r--r--devel/dcons/files/dcons.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/devel/dcons/files/dcons.sh b/devel/dcons/files/dcons.sh
new file mode 100644
index 0000000..d4800ac
--- /dev/null
+++ b/devel/dcons/files/dcons.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 64
+fi
+
+if [ -r /etc/defaults/rc.conf ]; then
+ . /etc/defaults/rc.conf
+ source_rc_confs
+elif [ -r /etc/rc.conf ]; then
+ . /etc/rc.conf
+fi
+
+case "$1" in
+start)
+ case ${dcons_enable:-NO} in
+ [Yy][Ee][Ss])
+ /sbin/kldload ${PREFIX}/lib/dcons/dcons.ko && echo -n ' dcons'
+ ;;
+ esac
+ ;;
+stop)
+ case ${dcons_enable:-NO} in
+ [Yy][Ee][Ss])
+ /sbin/kldunload dcons & echo -n ' dcons'
+ ;;
+ esac
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0
OpenPOWER on IntegriCloud