[debian-edu-commits] r83680 - in branches/debian-edu-config/jessie: . bin debian sbin share/ltsp/plugins/ltsp-build-client/Debian-custom

pere at alioth.debian.org pere at alioth.debian.org
Tue Aug 19 11:21:58 UTC 2014


Author: pere
Date: 2014-08-19 11:21:58 +0000 (Tue, 19 Aug 2014)
New Revision: 83680

Added:
   branches/debian-edu-config/jessie/bin/debian-edu-current-codename
Modified:
   branches/debian-edu-config/jessie/Makefile
   branches/debian-edu-config/jessie/debian/changelog
   branches/debian-edu-config/jessie/sbin/debian-edu-hwsetup
   branches/debian-edu-config/jessie/sbin/debian-edu-ltsp
   branches/debian-edu-config/jessie/sbin/debian-edu-pxeinstall
   branches/debian-edu-config/jessie/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-default-dist
Log:
Introduce new program debian-edu-current-codename used everywhere to
get the current Debian codename, to avoid hardcoding the fallback
codename in several scripts.  Update all scripts with hardcoded
codenames to use debian-edu-current-codename.

Modified: branches/debian-edu-config/jessie/Makefile
===================================================================
--- branches/debian-edu-config/jessie/Makefile	2014-08-19 11:06:21 UTC (rev 83679)
+++ branches/debian-edu-config/jessie/Makefile	2014-08-19 11:21:58 UTC (rev 83680)
@@ -1,6 +1,7 @@
 PACKAGE = debian-edu-config
 
 PROGS = \
+	debian-edu-current-codename \
 	debian-edu-ldapserver \
 	debconf-set-selections-edu \
 	ltsp-arch-debian-edu \

Added: branches/debian-edu-config/jessie/bin/debian-edu-current-codename
===================================================================
--- branches/debian-edu-config/jessie/bin/debian-edu-current-codename	                        (rev 0)
+++ branches/debian-edu-config/jessie/bin/debian-edu-current-codename	2014-08-19 11:21:58 UTC (rev 83680)
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+codename=$(lsb_release -sc)
+
+# Workaround for bad lsb_release behaviour when only a CD/DVD APT
+# source is listed in /etc/sources.list, or when installing from
+# testing/unstable.
+
+if [ "n/a" = "$codename" ] ; then
+    codename=jessie
+fi
+
+echo $codename


Property changes on: branches/debian-edu-config/jessie/bin/debian-edu-current-codename
___________________________________________________________________
Added: svn:executable
   + *

Modified: branches/debian-edu-config/jessie/debian/changelog
===================================================================
--- branches/debian-edu-config/jessie/debian/changelog	2014-08-19 11:06:21 UTC (rev 83679)
+++ branches/debian-edu-config/jessie/debian/changelog	2014-08-19 11:21:58 UTC (rev 83680)
@@ -13,6 +13,10 @@
       Translated by Chris Leick.
   * Adjust debian-edu-pxeinstall to use new pxelinux/syslinux-common
     package structure (Closes: #758568).
+  * Introduce new program debian-edu-current-codename used everywhere to
+    get the current Debian codename, to avoid hardcoding the fallback
+    codename in several scripts.  Update all scripts with hardcoded
+    codenames to use debian-edu-current-codename.
 
  -- Petter Reinholdtsen <pere at debian.org>  Tue, 19 Aug 2014 12:39:05 +0200
 

Modified: branches/debian-edu-config/jessie/sbin/debian-edu-hwsetup
===================================================================
--- branches/debian-edu-config/jessie/sbin/debian-edu-hwsetup	2014-08-19 11:06:21 UTC (rev 83679)
+++ branches/debian-edu-config/jessie/sbin/debian-edu-hwsetup	2014-08-19 11:21:58 UTC (rev 83680)
@@ -29,7 +29,8 @@
 
 add_nonfree_pkg() {
     pkg="$1"
-    codename=$(lsb_release -sc)
+    codename=$(debian-edu-current-codename)
+
     info "Installing non-free package $pkg from $codename."
     if ! LC_ALL=C apt-cache show $binpkg 2>&1 | \
                grep -q 'E: No packages found' ; then

Modified: branches/debian-edu-config/jessie/sbin/debian-edu-ltsp
===================================================================
--- branches/debian-edu-config/jessie/sbin/debian-edu-ltsp	2014-08-19 11:06:21 UTC (rev 83679)
+++ branches/debian-edu-config/jessie/sbin/debian-edu-ltsp	2014-08-19 11:21:58 UTC (rev 83680)
@@ -36,7 +36,7 @@
 export LC_ALL
 
 test "$base" || base=/opt/ltsp
-test "$dist" || dist=wheezy
+test "$dist" || dist=$(debian-edu-current-codename)
 
 if [ -d $base/$ARCH ] ; then
     echo "error: $base/$ARCH already exist.  Remove it before running $0"

Modified: branches/debian-edu-config/jessie/sbin/debian-edu-pxeinstall
===================================================================
--- branches/debian-edu-config/jessie/sbin/debian-edu-pxeinstall	2014-08-19 11:06:21 UTC (rev 83679)
+++ branches/debian-edu-config/jessie/sbin/debian-edu-pxeinstall	2014-08-19 11:21:58 UTC (rev 83680)
@@ -53,7 +53,7 @@
     . /etc/environment
 fi
 
-[ "$dist" ]      || dist=$(lsb_release -s -c)
+[ "$dist" ]      || dist=$(debian-edu-current-codename)
 [ "$archs" ]     || archs="i386 amd64"
 [ "$mirrorurl" ] || mirrorurl=http://http.debian.net/debian
 [ "$archiveurl" ] || archiveurl=http://ftp.skolelinux.org/skolelinux
@@ -67,12 +67,6 @@
 # Use Graphical installer by default
 graphicdi=false
 
-# Workaround for bad lsb_release behaviour when only a CD/DVD APT
-# source is listed in /etc/sources.list.
-if [ "n/a" = "$dist" ] ; then
-    dist=wheezy
-fi
-
 if [ -f /etc/debian-edu/config ] ; then
     . /etc/debian-edu/config
 fi

Modified: branches/debian-edu-config/jessie/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-default-dist
===================================================================
--- branches/debian-edu-config/jessie/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-default-dist	2014-08-19 11:06:21 UTC (rev 83679)
+++ branches/debian-edu-config/jessie/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-default-dist	2014-08-19 11:21:58 UTC (rev 83680)
@@ -2,7 +2,7 @@
     configure)
         if [  "$DIST" = "n/a" ]; then
             # set distribution if lsb_release failed to figure it out
-            DIST=wheezy
+            DIST=$(debian-edu-current-codename)
             echo "Note: setting distribution to $DIST, as auto-detection failed."
         fi
     ;;




More information about the debian-edu-commits mailing list