test
This commit is contained in:
@@ -3,4 +3,10 @@
|
||||
file="/config/vhclient.ini"
|
||||
touch $file
|
||||
|
||||
awk -f /usr/bin/vh_editini.awk -v section=$1 -v key=$2 -v value=$3 $file
|
||||
if [ -z "${3:-}" ]; then
|
||||
v = ''
|
||||
else
|
||||
v = $3
|
||||
fi
|
||||
|
||||
awk -f /usr/bin/vh_editini.awk -v section=$1 -v key=$2 -v value=$v $file
|
||||
|
||||
@@ -10,7 +10,7 @@ $0 ~ "^" key "=" {
|
||||
if (found_section) {
|
||||
found_key = 1;
|
||||
edited_row = 1;
|
||||
if (value) {
|
||||
if (value || value == 0) {
|
||||
print key "=" value;
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,7 @@ $0 ~ "^" key "=" {
|
||||
$0 ~ "^\\[" {
|
||||
if (found_section && !found_key) {
|
||||
found_key = 1;
|
||||
edited_row = 1;
|
||||
if (value) {
|
||||
if (value || value == 0) {
|
||||
print key "=" value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user