]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Fix lxc-net regression on missing restorecon
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 28 Apr 2015 07:01:40 +0000 (09:01 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 28 Apr 2015 07:01:40 +0000 (09:01 +0200)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
config/init/common/lxc-net.in

index 9f50436ebdc045493048d1c7119dfa86163ca973..a310507e570a664de55e6380bc44b90ef13be031 100644 (file)
@@ -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