summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-07-08 13:53:31 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-07-08 13:53:31 -0700
commitb10119fc55babd963b979b9ddcec9629d697f479 (patch)
treed13f6c045b34a0dfb9c165e2449fc4eea37aec17 /scripts
parent6307d0950019a6046c33ab5708414a5636801a3f (diff)
downloadvyatta-cfg-b10119fc55babd963b979b9ddcec9629d697f479.tar.gz
vyatta-cfg-b10119fc55babd963b979b9ddcec9629d697f479.zip
fix for bug 5803
* fix positional params handling in shell function. * fix argument handling in perl script.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-comment-config.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/vyatta-comment-config.pl b/scripts/vyatta-comment-config.pl
index 8ef4cb6..2cbd81d 100644
--- a/scripts/vyatta-comment-config.pl
+++ b/scripts/vyatta-comment-config.pl
@@ -71,7 +71,13 @@ if ($ARGV[$#ARGV] eq '') {
`rm -f $full_path/.comment`;
}
else {
- `echo \"$ARGV[$#ARGV]\" > $full_path/.comment`;
+ my $cfile;
+ if (!open($cfile, '>', "$full_path/.comment")) {
+ print "Failed to set comment\n";
+ exit 1;
+ }
+ print $cfile $ARGV[$#ARGV];
+ close($cfile);
}
print "Done\n";