]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Add openSUSE Leap release in opensuse template
authorTerzeus S. Dominguez <zeus@dmgznet.com>
Sun, 10 Jan 2016 15:13:48 +0000 (23:13 +0800)
committerTerzeus S. Dominguez <zeus@dmgznet.com>
Sun, 10 Jan 2016 15:25:41 +0000 (23:25 +0800)
Signed-off-by: Terzeus S. Dominguez <zeus@dmgznet.com>
templates/lxc-opensuse.in

index 45b072c68c600e97ab3641816f8cb30b06fc2253..3657795c0005e1446afff7d796a9d5a680872651 100644 (file)
@@ -136,8 +136,13 @@ download_opensuse()
     echo "Downloading opensuse minimal ..."
     mkdir -p "$cache/partial-$arch-packages"
     zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/distribution/$DISTRO/repo/oss/ repo-oss || return 1
-    zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
-    zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
+    # Leap update repos were rearranged
+    if [ $DISTRO == "leap/42.1" ]; then
+        zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/oss/ update || return 1
+    else
+        zypper --quiet --root $cache/partial-$arch-packages --non-interactive ar http://download.opensuse.org/update/$DISTRO/ update || return 1
+    fi
+       zypper --quiet --root $cache/partial-$arch-packages --non-interactive --gpg-auto-import-keys update || return 1
     zypper --root $cache/partial-$arch-packages --non-interactive in --auto-agree-with-licenses --download-only zypper lxc patterns-openSUSE-base bash iputils sed tar rsyslog || return 1
     cat > $cache/partial-$arch-packages/opensuse.conf << EOF
 Preinstall: aaa_base bash coreutils diffutils
@@ -157,7 +162,7 @@ Support: ncurses-utils
 Support: iputils
 Support: udev
 Support: netcfg
-Support: dhcpcd hwinfo insserv-compat module-init-tools openSUSE-release openssh
+Support: hwinfo insserv-compat module-init-tools openSUSE-release openssh
 Support: pwdutils rpcbind sysconfig
 
 Ignore: rpm:suse-build-key,build-key
@@ -169,6 +174,12 @@ EOF
        echo "Support: python3-base" >> $cache/partial-$arch-packages/opensuse.conf
     fi
 
+    # dhcpcd is not in the default repos with Leap 42.1
+    if [ $DISTRO != "leap/42.1"]
+    then
+    echo "Support: dhcpcd" >> $cache/partial-$arch-packages/opensuse.conf
+    fi
+
     if [ "$arch" = "i686" ]; then
         mkdir -p $cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i686/
         for i in "$cache/partial-$arch-packages/var/cache/zypp/packages/repo-oss/suse/i586/*" ; do
@@ -444,6 +455,11 @@ else
            echo "Selected openSUSE 13.2"
            ;;
 
+       42.1|leap/42.1|leap)
+           echo "Selected openSUSE Leap 42.1"
+           DISTRO="leap/42.1"
+           ;;
+
        *)
            echo "You have chosen an invalid release, quitting..."
            exit 1