# 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
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:]]'`
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"
;;
case "$with_init_script" in
distro)
case $with_distro in
- fedora|opensuse*)
+ fedora|altlinux|opensuse*)
init_script=systemd
;;
redhat|centos|oracle|oracleserver|sparclinux|plamo)
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
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
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
#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