summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorsrividya0208 <a.srividya@vyos.io>2021-06-16 13:42:22 -0400
committersrividya0208 <a.srividya@vyos.io>2021-06-16 13:42:22 -0400
commitde6a2c23225fff47cf2f59c392f7b3fcf90d5ae0 (patch)
treefbd8b04aa5edc395d15561cdf89845d0763bb680 /scripts
parent6ce46e947050d0219ad370734254db0c2ab09e2d (diff)
downloadvyatta-op-de6a2c23225fff47cf2f59c392f7b3fcf90d5ae0.tar.gz
vyatta-op-de6a2c23225fff47cf2f59c392f7b3fcf90d5ae0.zip
op-mode: T3582: Fix the function of "delete log file" command
Added the compeletion help to show the list of the files and also changed the command to delete the file as the existing command was deleting the file and not recreating the file to write the new logs. So modified the command so that it will delete the content of the file.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-delete-log-file.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/vyatta-delete-log-file.sh b/scripts/vyatta-delete-log-file.sh
index 8562738..577106d 100644
--- a/scripts/vyatta-delete-log-file.sh
+++ b/scripts/vyatta-delete-log-file.sh
@@ -2,7 +2,7 @@
if [ -e /var/log/user/"$1" ]
then
- rm -f /var/log/user/"$1"
+ echo -n "" > /var/log/user/"$1"
else
echo "File does not exist"
fi