]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/Makefile.am
Give the ability to non-root user to play with the containers. This feature
[mirror_lxc.git] / src / lxc / Makefile.am
index 53a0fa038964b0c048dbacf1551056b0f1e84417..8542183dffb162357bc8dba2a501d9dbcd3bf86c 100644 (file)
@@ -111,3 +111,18 @@ lxc_restart_LDADD = liblxc.la
 
 lxc_version_SOURCES = lxc_version.c
 lxc_version_LDADD = liblxc.la
+
+install-exec-local:
+       -@/usr/sbin/setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep $(bindir)/lxc-execute 2>&1 > /dev/null && \
+       /usr/sbin/setcap cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override=ep $(bindir)/lxc-start && \
+       mkdir -p $(prefix)/var/lxc && \
+       chmod ugo+rw $(prefix)/var/lxc || \
+       (echo && echo && \
+        echo "*****************************************************************" && \
+        echo "*                                                               *" && \
+        echo "* The installation failed to set file capabilities, that is ok, *" && \
+        echo "* but you won't have enough privilege to run the 'lxc' commands *" && \
+        echo "* and you will need to run them as 'root' yourself.             *" && \
+        echo "*                                                               *" && \
+        echo "*****************************************************************" && \
+        echo && echo)
\ No newline at end of file