Skip to content

Commit

Permalink
correct install hook test on macos; mention -t in usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dleonard committed Nov 4, 2008
1 parent 8162ac8 commit c0e2365
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dnsupdate-install-hooks.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ umask 022

#-- Display the program usage
usage () {
echo "usage: $0 [-irqh] [platform]" >&2
echo "usage: $0 [-hiqrt] [platform]" >&2
cat <<-. >&2
-h Help (display this information)
-i Installs a DHCP client hook to run dnsupdate on address changes.
-q Quiet, no informational messages.
-r Removes the last installed hook.
-t Test if it looks like a hook is already installed
platform DHCP client type to install hook. Auto-detected if missing.
One of:
Expand Down Expand Up @@ -371,7 +372,8 @@ macos_remove () {
}

macos_test () {
/bin/launchctl list com.quest.rc.ipwatchd > /dev/null
test -r $IPWATCH_PLIST &&
/bin/launchctl list | fgrep com.quest.rc.ipwatchd > /dev/null
}

#------------------------------------------------------------
Expand All @@ -387,8 +389,7 @@ while getopts hiqrt f; do
q) QUIET=true;;
r) ACTION=remove;;
t) ACTION=test;;
\?) ERROR=true;;
*)
*) ERROR=true;;
esac
done
shift `expr $OPTIND - 1`
Expand Down

0 comments on commit c0e2365

Please sign in to comment.