Author: dougb
Date: Sun Mar  7 04:26:21 2010
New Revision: 204818
URL: http://svn.freebsd.org/changeset/base/204818

Log:
  Implement the idea of parallel-only-at-start-time in a cleaner, more
  rc.d'ish way.
  
  Not objected to by:   netchild

Modified:
  head/etc/rc.d/jail

Modified: head/etc/rc.d/jail
==============================================================================
--- head/etc/rc.d/jail  Sun Mar  7 02:04:59 2010        (r204817)
+++ head/etc/rc.d/jail  Sun Mar  7 04:26:21 2010        (r204818)
@@ -18,6 +18,8 @@
 
 name="jail"
 rcvar=`set_rcvar`
+
+start_precmd="jail_prestart"
 start_cmd="jail_start"
 stop_cmd="jail_stop"
 
@@ -545,6 +547,13 @@ jail_ips()
        done
 }
 
+jail_prestart()
+{
+       if checkyesno jail_parallel_start; then
+               command_args='&'
+       fi
+}
+
 jail_start()
 {
        echo -n 'Configuring jails:'
@@ -730,18 +739,4 @@ if [ -n "$*" ]; then
        jail_list="$*"
 fi
 
-# Only allow the parallel start of jails, other commands are not
-# safe to execute in parallel.
-case "${cmd}" in
-*start)
-       ;;
-*)
-       jail_parallel_start=NO
-esac
-
-if checkyesno jail_parallel_start; then
-       run_rc_command "${cmd}" &
-else
-       run_rc_command "${cmd}"
-fi
-
+run_rc_command "${cmd}"
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to