Permalink
Browse files

Fix rc file order to respect defaults correctly, style nits and stop

calling test where expressions will do.

Feature safe:	yes
  • Loading branch information...
1 parent 1a14268 commit 76f87dbfcdd3a3408d05791bfc1f4213a2cf42b6 @crees crees committed Nov 10, 2012
Showing with 12 additions and 11 deletions.
  1. +12 −11 net-mgmt/openvmps/files/vmpsd.in
@@ -1,28 +1,29 @@
#!/bin/sh
-# Start or stop vmpsd
# $FreeBSD$
# PROVIDE: vmpsd
# REQUIRE: DAEMON
# KEYWORD: shutdown
+. /etc/rc.subr
+
+name=vmpsd
+rcvar=vmpsd_enable
+
+load_rc_config $name
+
# Define these vmpsd_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/vmpsd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-[ -z "$vmpsd_enable" ] && vmpsd_enable="NO" # Enable vmpsd
-#vmpsd_program="%%PREFIX%%/sbin/vmpsd" # Location of vmpsd
-[ -z "$vmpsd_flags" ] && vmpsd_flags="-f /usr/local/etc/vmps.db" # Flags to vmpsd program
-. /etc/rc.subr
+: ${vmpsd_enable:=NO} # Enable vmpsd
+: ${vmpsd_program:=%%PREFIX%%/sbin/vmpsd} # Location of vmpsd
+: ${vmpsd_flags=-f /usr/local/etc/vmps.db} # Flags to vmpsd program
-name="vmpsd"
-rcvar=vmpsd_enable
-command="%%PREFIX%%/sbin/${name}"
+command=%%PREFIX%%/sbin/${name}
-load_rc_config $name
-run_rc_command "$1"
+run_rc_command $1

0 comments on commit 76f87db

Please sign in to comment.