Browse Source

gluon-autoupdater: double quote $1 to prevent globbing and word splitting

Jan-Tarek Butt 7 years ago
parent
commit
85c66b3bf8
1 changed files with 4 additions and 4 deletions
  1. 4 4
      package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh

+ 4 - 4
package/gluon-autoupdater/files/lib/gluon/autoupdater/lib.sh

@@ -2,15 +2,15 @@
 
 
 stop() {
-        if [ -x /etc/init.d/$1 ]; then
+        if [ -x /etc/init.d/"$1" ]; then
                 echo "Stopping $1..."
-                /etc/init.d/$1 stop
+                /etc/init.d/"$1" stop
         fi
 }
 
 start_enabled() {
-        if [ -x /etc/init.d/$1 ] && /etc/init.d/$1 enabled; then
+        if [ -x /etc/init.d/"$1" ] && /etc/init.d/"$1" enabled; then
                 echo "Starting $1..."
-                /etc/init.d/$1 start
+                /etc/init.d/"$1" start
         fi
 }