From: Stéphane Graber Date: Tue, 28 Apr 2015 07:01:40 +0000 (+0200) Subject: Fix lxc-net regression on missing restorecon X-Git-Tag: lxc-2.0.0.beta1~293 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47fcda9926100d3ffbd01d848943a7eaf78655ff;p=thirdparty%2Flxc.git Fix lxc-net regression on missing restorecon Signed-off-by: Stéphane Graber --- diff --git a/config/init/common/lxc-net.in b/config/init/common/lxc-net.in index 9f50436eb..a310507e5 100644 --- a/config/init/common/lxc-net.in +++ b/config/init/common/lxc-net.in @@ -79,8 +79,7 @@ start() { # can't write its pid into, so we restorecon it (to var_run_t) if [ ! -d "${varrun}" ]; then mkdir -p "${varrun}" - which restorecon >/dev/null 2>&1 - if [ $? = 0 ]; then + if which restorecon >/dev/null 2>&1; then restorecon "${varrun}" fi fi