upstart: Fix wrong stderr redirect

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber 2014-02-18 11:31:48 -05:00
parent e8ea311657
commit a262569cbf
No known key found for this signature in database
GPG Key ID: C638974D64792D67

View File

@ -21,7 +21,7 @@ pre-start script
[ "x$USE_LXC_BRIDGE" = "xtrue" ] || { stop; exit 0; } [ "x$USE_LXC_BRIDGE" = "xtrue" ] || { stop; exit 0; }
use_iptables_lock="-w" use_iptables_lock="-w"
iptables -w -L -n 2>&1 > /dev/null || use_iptables_lock="" iptables -w -L -n > /dev/null 2>&1 || use_iptables_lock=""
cleanup() { cleanup() {
# dnsmasq failed to start, clean up the bridge # dnsmasq failed to start, clean up the bridge
iptables $use_iptables_lock -D INPUT -i ${LXC_BRIDGE} -p udp --dport 67 -j ACCEPT iptables $use_iptables_lock -D INPUT -i ${LXC_BRIDGE} -p udp --dport 67 -j ACCEPT
@ -74,7 +74,7 @@ post-stop script
if [ -d /sys/class/net/${LXC_BRIDGE} ]; then if [ -d /sys/class/net/${LXC_BRIDGE} ]; then
use_iptables_lock="-w" use_iptables_lock="-w"
iptables -w -L -n 2>&1 > /dev/null || use_iptables_lock="" iptables -w -L -n > /dev/null 2>&1 || use_iptables_lock=""
ifconfig ${LXC_BRIDGE} down ifconfig ${LXC_BRIDGE} down
iptables $use_iptables_lock -D INPUT -i ${LXC_BRIDGE} -p udp --dport 67 -j ACCEPT iptables $use_iptables_lock -D INPUT -i ${LXC_BRIDGE} -p udp --dport 67 -j ACCEPT
iptables $use_iptables_lock -D INPUT -i ${LXC_BRIDGE} -p tcp --dport 67 -j ACCEPT iptables $use_iptables_lock -D INPUT -i ${LXC_BRIDGE} -p tcp --dport 67 -j ACCEPT