ffluci-splash: Minor fixes
authorSteven Barth <steven@midlink.org>
Sun, 27 Apr 2008 23:01:47 +0000 (23:01 +0000)
committerSteven Barth <steven@midlink.org>
Sun, 27 Apr 2008 23:01:47 +0000 (23:01 +0000)
contrib/package/ffluci-splash/src/luci-splash.lua

index 72a801cd308a088d4752b0de15b9c07e643ff328..72b63494c5b1ae8adee72a443d043ac879bb5103 100644 (file)
@@ -14,10 +14,7 @@ function main(argv)
        local cmd = argv[1]
        local arg = argv[2]
        
-       if not cmd then
-               print("Usage: " .. argv[0] .. " <status|add|remove|sync> [MAC]")
-               os.exit(1)
-       elseif cmd == "status" then
+       if cmd == "status" then
                if not arg then
                        os.exit(1)
                end
@@ -47,7 +44,7 @@ function main(argv)
                end
                os.exit(0)
        elseif cmd == "remove" then
-               if not cmd[2] then
+               if not arg then
                        os.exit(1)
                end
                
@@ -56,6 +53,9 @@ function main(argv)
        elseif cmd == "sync" then
                sync()
                os.exit(0)
+       else
+               print("Usage: " .. argv[0] .. " <status|add|remove|sync> [MAC]")
+               os.exit(1)      
        end
 end