OSDN Git Service

When /etc/lxcf/lxcf.conf does not exist, it restores /etc/lxcf.
authorHideyuki Niwa <niwa.hideyuki@jp.fujitsu.com>
Thu, 6 Feb 2014 02:02:01 +0000 (11:02 +0900)
committerHideyuki Niwa <niwa.hideyuki@jp.fujitsu.com>
Thu, 6 Feb 2014 02:02:01 +0000 (11:02 +0900)
lxcf/Makefile
lxcf/Makefile_fedora19
lxcf/lib/lxcf-clone
lxcf/lib/lxcf-erase
lxcf/lib/lxcf-sysgen
lxcf/lxcf.spec

index 93f1fcd..c540f93 100644 (file)
@@ -121,6 +121,7 @@ install_conf :
        mkdir -p ${prefix}/etc/lxcf
        chmod 755 ${prefix}/etc/lxcf
        install -o root -g root -m 644 conf/lxcf.conf ${prefix}/etc/lxcf/lxcf.conf
+       install -o root -g root -m 644 conf/lxcf.conf ${prefix}/usr/lib/lxcf/lxcf.conf
        mkdir -p ${prefix}/usr/lib/systemd/system
        install -o root -g root -m 600 conf/lxcf.service ${prefix}/usr/lib/systemd/system/lxcf.service
        mkdir -p ${prefix}/etc/systemd/system/multi-user.target.wants
index e5d39bf..60e62f5 100644 (file)
@@ -112,6 +112,7 @@ install_conf :
        mkdir -p ${prefix}/etc/lxcf
        chmod 755 ${prefix}/etc/lxcf
        install -o root -g root -m 644 conf/lxcf.conf ${prefix}/etc/lxcf/lxcf.conf
+       install -o root -g root -m 644 conf/lxcf.conf ${prefix}/usr/lib/lxcf/lxcf.conf
        mkdir -p ${prefix}/usr/lib/systemd/system
        install -o root -g root -m 600 conf/lxcf.service ${prefix}/usr/lib/systemd/system/lxcf.service
        mkdir -p ${prefix}/etc/systemd/system/multi-user.target.wants
index 3b9bb0d..60c0337 100755 (executable)
@@ -65,6 +65,11 @@ mkdir -p /etc/lxcf/rsc
 chmod 755 /etc/lxcf
 chmod 755 /etc/lxcf/rsc
 
+# check lxcf.conf
+if [ ! -e /etc/lxcf/lxcf.conf ] ; then
+  cp -p /usr/lib/lxcf/lxcf.conf /etc/lxcf/lxcf.conf
+fi
+
 # cp files
 cpfiles() {
 
index 927e970..1cbc088 100755 (executable)
@@ -31,6 +31,11 @@ mkdir -p /etc/lxcf/rsc
 chmod 755 /etc/lxcf
 chmod 755 /etc/lxcf/rsc
 
+# check lxcf.conf
+if [ ! -e /etc/lxcf/lxcf.conf ] ; then
+  cp -p /usr/lib/lxcf/lxcf.conf /etc/lxcf/lxcf.conf
+fi
+
 # erase one container
 lxcf_erase1() {
   LXCNAME=$1
index e18fe03..fff7057 100755 (executable)
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  
 # 02110-1301, USA.
 
+
+# check /opt/lxcf
+mkdir -p /opt/lxcf
+chmod 755 /opt/lxcf
+
+# check /etc/lxcf/rsc
+mkdir -p /etc/lxcf/rsc
+chmod 755 /etc/lxcf
+chmod 755 /etc/lxcf/rsc
+
+# check lxcf.conf
+if [ ! -e /etc/lxcf/lxcf.conf ] ; then
+  cp -p /usr/lib/lxcf/lxcf.conf /etc/lxcf/lxcf.conf
+fi
+
 # check default separate mdoel
 /usr/lib/lxcf/lxcf-config
 if [ -e /etc/lxcf/separate ] ; then
@@ -64,15 +79,6 @@ if [ ${FLG_C} -eq 1 ] ; then
   fi
 fi
 
-# check /opt/lxcf
-mkdir -p /opt/lxcf
-chmod 755 /opt/lxcf
-
-# check /etc/lxcf/rsc
-mkdir -p /etc/lxcf/rsc
-chmod 755 /etc/lxcf
-chmod 755 /etc/lxcf/rsc
-
 # generate one container
 lxcf_sysgen1() {
   LXCNAME=${1}
index ac1ed1c..edeb628 100644 (file)
@@ -124,6 +124,7 @@ systemctl restart libvirtd
 /usr/lib/lxcf/sbin/suspend
 /usr/lib/lxcf/sbin/suspend-n
 /usr/lib/lxcf/sbin/list
+/usr/lib/lxcf/lxcf.conf
 /etc/lxcf/lxcf.conf
 /etc/libvirt/hooks/lxc
 /etc/libvirt/hooks/qemu