Module Name: src
Committed By: uwe
Date: Sun Dec 20 21:30:28 UTC 2020
Modified Files:
src/etc: rc.subr
Log Message:
run_rc_command - don't prefix the rcvar variable name with the dollar sign.
The output without the dollar sign is less confusing as it's actual
valid shell syntax:
$ /etc/rc.d/foo rcvar
# food
food=YES
Brought up on tech-userlevel@ by Rocky Hotas with some LGTMs from
other people and no objections.
We still refer to '$food' in warnings/errors though.
To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/etc/rc.subr
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/rc.subr
diff -u src/etc/rc.subr:1.105 src/etc/rc.subr:1.106
--- src/etc/rc.subr:1.105 Thu Sep 17 20:29:03 2020
+++ src/etc/rc.subr Sun Dec 20 21:30:28 2020
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.105 2020/09/17 20:29:03 otis Exp $
+# $NetBSD: rc.subr,v 1.106 2020/12/20 21:30:28 uwe Exp $
#
# Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -822,9 +822,9 @@ $command $rc_flags $command_args"
echo "# $name"
if [ -n "$rcvar" ]; then
if checkyesno ${rcvar}; then
- echo "\$${rcvar}=YES"
+ echo "${rcvar}=YES"
else
- echo "\$${rcvar}=NO"
+ echo "${rcvar}=NO"
fi
fi
;;