More NetBSD tweaks.
This commit is contained in:
parent
acbaacb2c1
commit
de6e4d3f50
@ -34,18 +34,21 @@ depend() {
|
||||
_set() {
|
||||
local id=0
|
||||
|
||||
[ -n "$1" ] && id=$1
|
||||
ebegin "Setting Host UUID: ${id}"
|
||||
sysctl kern.hostuuid="${id}" >/dev/null
|
||||
eend $? || return 1
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
id=$(echo "$1" | md5)
|
||||
id="0x${id%????????????????????????}"
|
||||
fi
|
||||
ebegin "Setting Host ID: ${id}"
|
||||
sysctl kern.hostid="${id}" >/dev/null
|
||||
eend $?
|
||||
sysctl -w kern.hostid="${id}" >/dev/null
|
||||
eend $? || return 1
|
||||
|
||||
if sysctl -n kern.hostuuid >/dev/null 2>&1; then
|
||||
[ -n "$1" ] && id=$1
|
||||
ebegin "Setting Host UUID: ${id}"
|
||||
sysctl kern.hostuuid="${id}" >/dev/null
|
||||
eend $? || return 1
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
# First we check to see if there is a system UUID
|
||||
|
@ -37,7 +37,7 @@ start() {
|
||||
case "${var}" in
|
||||
""|"#"*) continue;;
|
||||
esac
|
||||
sysctl "${var}" >/dev/null || retval=1
|
||||
sysctl -w "${var}" >/dev/null || retval=1
|
||||
done < /etc/sysctl.conf
|
||||
eend ${retval} "Some errors were encountered"
|
||||
eend $?
|
||||
|
5
init.d.NetBSD/Makefile
Normal file
5
init.d.NetBSD/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
DIR= /etc/init.d
|
||||
BIN= ${CONTENTS}
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/scripts.mk
|
15
init.d.NetBSD/ttys
Normal file
15
init.d.NetBSD/ttys
Normal file
@ -0,0 +1,15 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
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
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
BOOT= clock dumpon hostid syscons
|
||||
BOOT= clock dumpon syscons
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/runlevels.mk
|
||||
|
4
runlevels.NetBSD/Makefile
Normal file
4
runlevels.NetBSD/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
BOOT= ttys
|
||||
|
||||
MK= ../mk
|
||||
include ${MK}/runlevels.mk
|
Loading…
Reference in New Issue
Block a user