]> 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 2acd29ab81c0350fa1abf6c5c5a762e0cec49cf5..8542183dffb162357bc8dba2a501d9dbcd3bf86c 100644 (file)
@@ -43,7 +43,8 @@ liblxc_la_SOURCES = \
 liblxc_la_LDFLAGS = -release @PACKAGE_VERSION@
 
 bin_SCRIPTS = \
-       lxc-ps
+       lxc-ps \
+       lxc-checkconfig
 
 bin_PROGRAMS = \
        lxc-create \
@@ -110,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