]> 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 ea85fb204fbbedfa16de6750624227638cec2334..8542183dffb162357bc8dba2a501d9dbcd3bf86c 100644 (file)
@@ -25,7 +25,7 @@ liblxc_la_SOURCES = \
        checkpoint.c \
        restart.c \
        version.c \
-       lxc_cgroup.c lxc_cgroup.h \
+       cgroup.c cgroup.h \
        lxc.h \
        lxc_utils.h \
        lxc_lock.c lxc_lock.h \
@@ -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 \
@@ -57,8 +58,8 @@ bin_PROGRAMS = \
        lxc-kill \
        lxc-freeze \
        lxc-info \
+       lxc-cgroup \
        lxc-unfreeze \
-       lxc-priority \
        lxc-checkpoint \
        lxc-restart \
        lxc-version
@@ -99,8 +100,8 @@ lxc_freeze_LDADD = liblxc.la
 lxc_unfreeze_SOURCES = lxc_unfreeze.c
 lxc_unfreeze_LDADD = liblxc.la
 
-lxc_priority_SOURCES = lxc_priority.c
-lxc_priority_LDADD = liblxc.la
+lxc_cgroup_SOURCES = lxc_cgroup.c
+lxc_cgroup_LDADD = liblxc.la
 
 lxc_checkpoint_SOURCES = lxc_checkpoint.c
 lxc_checkpoint_LDADD = liblxc.la
@@ -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