]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Added ALTLinux distribution.
authorDenis Pynkin <denis_pynkin@epam.com>
Sat, 5 Mar 2016 13:40:17 +0000 (16:40 +0300)
committerDenis Pynkin <denis_pynkin@epam.com>
Sat, 5 Mar 2016 13:50:32 +0000 (16:50 +0300)
- Added ALTLinux distribution.
- Updated template for ALTLinux Sisyphus

Signed-off-by: Denis Pynkin <denis_pynkin@epam.com>
configure.ac
templates/lxc-altlinux.in

index 47564931145b7dabdc48facaaca40627493d296f..7fdda70b38cdd6e7747827b15181603de8182044 100644 (file)
@@ -36,7 +36,7 @@ AC_GNU_SOURCE
 # Detect the distribution. This is used for the default configuration and
 # for some distro-specific build options.
 AC_MSG_CHECKING([host distribution])
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, plamo, paldo, openmandriva, pardus, sparclinux.]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, oracle, centos, fedora, suse, gentoo, debian, arch, slackware, plamo, paldo, openmandriva, pardus, sparclinux, altlinux.]))
 if type lsb_release >/dev/null 2>&1 && test "z$with_distro" = "z"; then
        with_distro=`lsb_release -is`
 fi
@@ -56,6 +56,7 @@ if test "z$with_distro" = "z"; then
        AC_CHECK_FILE(/etc/mandrakelinux-release, with_distro="openmandriva")
        AC_CHECK_FILE(/etc/mandriva-release,with_distro="openmandriva")
        AC_CHECK_FILE(/etc/pardus-release,with_distro="pardus")
+       AC_CHECK_FILE(/etc/altlinux-release,with_distro="altlinux")
 fi
 with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]'`
 
@@ -71,7 +72,7 @@ case $with_distro in
                distroconf=default.conf.lxcbr
                distrosysconf="$sysconfdir/default"
                ;;
-       redhat|centos|fedora|oracle|oracleserver|sparclinux|suse|opensuse*|plamo)
+       redhat|centos|fedora|oracle|oracleserver|sparclinux|altlinux|suse|opensuse*|plamo)
                distroconf=default.conf.lxcbr
                distrosysconf="$sysconfdir/sysconfig"
                ;;
@@ -95,7 +96,7 @@ AC_ARG_WITH([init-script],
 case "$with_init_script" in
        distro)
                case $with_distro in
-                       fedora|opensuse*)
+                       fedora|altlinux|opensuse*)
                                init_script=systemd
                                ;;
                        redhat|centos|oracle|oracleserver|sparclinux|plamo)
index 8b4168c61abde892aba60d1da563800ed0f0de2f..57c62746ad1da105d99c6228e9a52deabd51b3ad 100644 (file)
@@ -57,33 +57,33 @@ configure_altlinux()
     mkdir -p $rootfs_path/selinux
     echo 0 > $rootfs_path/selinux/enforce
 
-    mkdir -p ${rootfs_path}/etc/net/ifaces/veth0
-    cat <<EOF > ${rootfs_path}/etc/net/ifaces/veth0/options
+    mkdir -p ${rootfs_path}/etc/net/ifaces/eth0
+    cat <<EOF > ${rootfs_path}/etc/net/ifaces/eth0/options
 BOOTPROTO=${BOOTPROTO}
 ONBOOT=yes
-NM_CONTROLLED=no
+NM_CONTROLLED=yes
 TYPE=eth
 EOF
 
 if [ ${BOOTPROTO} != "dhcp" ]; then
     # ip address
-    cat <<EOF > ${rootfs_path}/etc/net/ifaces/veth0/ipv4address
+    cat <<EOF > ${rootfs_path}/etc/net/ifaces/eth0/ipv4address
 ${ipv4}
 EOF
 
-    cat <<EOF > ${rootfs_path}/etc/net/ifaces/veth0/ipv4route
+    cat <<EOF > ${rootfs_path}/etc/net/ifaces/eth0/ipv4route
 ${gw}
 EOF
 
-    cat <<EOF > ${rootfs_path}/etc/net/ifaces/veth0/resolv.conf
+    cat <<EOF > ${rootfs_path}/etc/net/ifaces/eth0/resolv.conf
 nameserver ${dns}
 EOF
 
-    cat <<EOF > ${rootfs_path}/etc/net/ifaces/veth0/ipv6address
+    cat <<EOF > ${rootfs_path}/etc/net/ifaces/eth0/ipv6address
 ${ipv6}
 EOF
 
-    cat <<EOF > ${rootfs_path}/etc/net/ifaces/veth0/ipv6route
+    cat <<EOF > ${rootfs_path}/etc/net/ifaces/eth0/ipv6route
 ${gw6}
 EOF
 
@@ -109,14 +109,17 @@ EOF
     echo "console" >> ${rootfs_path}/etc/securetty
 
     # Enable services
-    for service in network syslogd random
+    for service in network syslogd random NetworkManager
     do
        chroot ${rootfs_path} chkconfig $service --list &>/dev/null && chroot ${rootfs_path} chkconfig $service on || true
+       # For systemd
+       chroot ${rootfs_path} systemctl -q enable $service &>/dev/null|| true
     done
     # Disable services
     for service in rawdevices fbsetfont
     do
        chroot ${rootfs_path} chkconfig $service --list &>/dev/null && chroot ${rootfs_path} chkconfig $service off || true
+       chroot ${rootfs_path} systemctl -q disable $service &>/dev/null || true
     done
 
     subst 's/^\([3-9]\+:[0-9]\+:respawn:\/sbin\/mingetty.*\)/#\1/' ${rootfs_path}/etc/inittab
@@ -175,7 +178,7 @@ download_altlinux()
     APT_GET="apt-get -o RPM::RootDir=$INSTALL_ROOT -y"
     PKG_LIST="$(grep -hs '^[^#]' "$profile_dir/$profile")"
     # if no configuration file $profile -- fall back to default list of packages
-    [ -z "$PKG_LIST" ] && PKG_LIST="interactivesystem apt apt-conf-sisyphus etcnet openssh-server systemd systemd-units systemd-sysvinit"
+    [ -z "$PKG_LIST" ] && PKG_LIST="interactivesystem apt apt-conf-sisyphus etcnet-full openssh-server systemd-sysvinit systemd-units systemd NetworkManager-daemon"
 
     mkdir -p $INSTALL_ROOT/var/lib/rpm
     rpm --root $INSTALL_ROOT  --initdb
@@ -272,11 +275,11 @@ lxc.cap.drop = sys_module mac_admin mac_override sys_time
 #lxc.aa_profile = unconfined
 
 #networking
-lxc.network.type = $lxc_network_type
-lxc.network.flags = up
-lxc.network.link = $lxc_network_link
-lxc.network.name = veth0
-lxc.network.mtu = 1500
+#lxc.network.type = $lxc_network_type
+#lxc.network.flags = up
+#lxc.network.link = $lxc_network_link
+#lxc.network.name = veth0
+#lxc.network.mtu = 1500
 EOF
 if [ ! -z ${ipv4} ]; then
     cat <<EOF >> $config_path/config