Hi, Didier,

å 2005-04-06äç 13:39 +0200ïDidier Wirothåéï
> Is there a patch available for the rc.d mouse script?

I don't have a patch that is good enough to warrant a commit at present.
You may want to try the patch attached, but I can not promise that it
will work for every case.

Thanks for your testing!

Cheers,
-- 
Xin LI <delphij delphij net>  http://www.delphij.net/
Index: jail
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/jail,v
retrieving revision 1.21
diff -u -r1.21 jail
--- jail	16 Jan 2005 03:12:03 -0000	1.21
+++ jail	1 Feb 2005 07:21:57 -0000
@@ -59,6 +59,14 @@
 	eval jail_procfs=\"\$jail_${_j}_procfs_enable\"
 	[ -z "${jail_procfs}" ] && jail_procfs="NO"
 
+	# Default settings for skel jail
+	eval jail_skel_enable=\"\$jail_${_j}_skel_enable\"
+	[ -z "${jail_skel_enable}" ] && jail_skel_enable="NO"
+	eval jail_skel_root=\"\$jail_${_j}_skel_root\"
+	[ -z "${jail_skel_root}" ] && jail_skel_root="/"
+	eval jail_skel_romounts=\"\$jail_${_j}_skel_romounts\"
+	[ -z "${jail_skel_romounts}" ] && jail_skel_romounts="bin sbin lib libexec usr/bin usr/sbin usr/include usr/lib usr/libdata usr/libexec usr/sbin usr/share"
+
 	eval jail_mount=\"\$jail_${_j}_mount_enable\"
 	[ -z "${jail_mount}" ] && jail_mount="NO"
 	# "/etc/fstab.${_j}" will be used for {,u}mount(8) if none is specified.
@@ -81,6 +89,9 @@
 	debug "$_j fstab: $jail_fstab"
 	debug "$_j exec start: $jail_exec_start"
 	debug "$_j exec stop: $jail_exec_stop"
+	debug "$_j skel enable: $jail_skel_enable"
+	debug "$_j skel mount-readonly: $jail_skel_romounts"
+	debug "$_j skel mount-readonly from: $jail_skel_root"
 }
 
 # set_sysctl rc_knob mib msg
@@ -136,6 +147,14 @@
 		[ -f "${jail_fstab}" ] || warn "${jail_fstab} does not exist"
 		umount -a -F "${jail_fstab}" >/dev/null 2>&1
 	fi
+	if checkyesno jail_skel_enable; then
+		for _mntpt in $jail_skel_romounts
+		do
+			if [ -d "${jail_rootdir}/${_mntpt}" ] ; then
+				umount -f ${jail_rootdir}/${_mntpt} > /dev/null 2>&1
+			fi
+		done
+	fi
 }
 
 jail_start()
@@ -155,6 +174,13 @@
 	for _jail in ${jail_list}
 	do
 		init_variables $_jail
+		if checkyesno jail_skel_enable; then
+			info "Mounting skeleton for jail ${_jail} from ${jail_skel_root}"
+			for _mntpt in $jail_skel_romounts
+			do
+				mount_nullfs -ordonly ${jail_skel_root}/${_mntpt} ${jail_rootdir}/${_mntpt} > /dev/null 2>&1
+			done
+		fi
 		if checkyesno jail_mount; then
 			info "Mounting fstab for jail ${_jail} (${jail_fstab})"
 			if [ ! -f "${jail_fstab}" ]; then
Index: moused
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/moused,v
retrieving revision 1.9
diff -u -r1.9 moused
--- moused	16 Jan 2005 03:12:03 -0000	1.9
+++ moused	7 Apr 2005 13:41:45 -0000
@@ -10,10 +10,16 @@
 
 . /etc/rc.subr
 
+# stdin must be redirected because it might be a serial console
+#
+ttyv=/dev/ttyv0
+
 name=moused
 rcvar=`set_rcvar`
 command="/usr/sbin/${name}"
+required_files="${ttyv}"
 start_cmd="moused_start"
+stop_postcmd="moused_postcmd"
 _pidprefix="/var/run/moused"
 pidfile="${_pidprefix}.pid"
 _pidarg=
@@ -66,10 +72,13 @@
 		;;
 	esac
 
-	for ttyv in /dev/ttyv* ; do
-		vidcontrol < ${ttyv} ${_mousechar_arg} -m on
-	done
+	vidcontrol < ${ttyv} ${_mousechar_arg} -m on
 	echo '.'
 }
 
+moused_postcmd()
+{
+	vidcontrol < ${ttyv} -m off
+}
+
 run_rc_command $*

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to