Permalink
Browse files

iptables API

  • Loading branch information...
kaihendry committed Feb 28, 2013
1 parent 3871959 commit 68b8445a0e919641d7ecdf24eca7352d47bdb77e
Showing with 14 additions and 2 deletions.
  1. +14 −2 etc/webc/live-config.sh
View
@@ -127,6 +127,18 @@ for x in $( cmdline ); do
fi
;;
+ iptables=*)
+ options=$( /bin/busybox httpd -d ${x#iptables=} )
+
+ if iptables $options
+ then
+ logs "OK iptables: $options"
+ else
+ logs "NOK iptables: $options"
+ fi
+
+ ;;
+
log=*)
log=${x#log=}
echo "*.* @${log}" >> /etc/rsyslog.conf
@@ -142,7 +154,7 @@ for x in $( cmdline ); do
;;
cron=*)
- cron="$( echo ${x#cron=} | sed 's,%20, ,g' )"
+ cron="$( echo ${x#cron=} | sed 's,%20, ,g' )"
cat <<EOC > /etc/cron.d/live-config
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@ -252,5 +264,5 @@ else
logs "Not a writable boot medium. Could not cache configuration nor upgrade."
fi
-# live-config should restart via systemd and get blocked
+# live-config should restart via systemd and get blocked
# until $live_config_pipe is re-created

0 comments on commit 68b8445

Please sign in to comment.