Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/etc/rc.d Don't try to execute this script if ipfs is not set...



details:   https://anonhg.NetBSD.org/src/rev/7029f1a415c9
branches:  trunk
changeset: 522095:7029f1a415c9
user:      martti <martti%NetBSD.org@localhost>
date:      Mon Feb 11 13:39:14 2002 +0000

description:
Don't try to execute this script if ipfs is not set to YES. Otherwise
you'll see the following message:

   # /etc/rc.d/ipfs stop
   /etc/rc.d/ipfs: WARNING: $ipfs is not set properly.

This horrible change is needed because of the "shutdown" keyword.

diffstat:

 etc/rc.d/ipfs |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r a96b22ca0837 -r 7029f1a415c9 etc/rc.d/ipfs
--- a/etc/rc.d/ipfs     Mon Feb 11 12:54:13 2002 +0000
+++ b/etc/rc.d/ipfs     Mon Feb 11 13:39:14 2002 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ipfs,v 1.1 2002/02/11 10:19:55 martti Exp $
+# $NetBSD: ipfs,v 1.2 2002/02/11 13:39:14 martti Exp $
 #
 
 # PROVIDE: ipfs
@@ -34,4 +34,10 @@
 }
 
 load_rc_config $name
-run_rc_command "$1"
+case "${ipfs}" in
+       [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+               run_rc_command "$1"
+               ;;
+       *)
+               ;;
+esac



Home | Main Index | Thread Index | Old Index