Jonas Smedegaard wrote:
> severity 315729 wishlist
> thanks
> 
> On 25-06-2005 14:30, Finn-Arne Johansen wrote:
> 
>>>Even if I add the lessdisks packages on a cd that is installable (like a
>>>custom debian-edu-CD), I'm not able to install the lessdisks chroot from
>>>the CD, unless I do a lot of things, like setting up a local http-apt
>>>source using the CD. THis makes it hard to install for nonexperienced
>>>users without net connectivity
>>>
>>>This work with upstream, and I hope to be able to patch this in (Shouldn't
>>>be that hard)
> 
> 
> Thanks for filing this bugreport.
> 
> I agree that this is missing from the lessdisks in Debian, and I agree
> that this is easier with the newer upstream lessdisks, but I disagree
> that it is an important issue (for the maintainance if this package - it
> may very well be more important for debian-edu).
> 
> One of the possible "fixes" to this "bug" is off course to upgrade to
> newest upstream package. This does, however, involve other issues so is
> not as simple as just packaging it (or using the package provided upstream).

Another fix is attached here.

Actually, there is 2 patches attached.

301_allow_noninteractive_install honours lessdisks_noninteractive if
set. Before this, I used 'yes "" | lessdisks-install'
If the install fails, I do get a prompt asking me what to do

302_allow_install_from_cd will let you set default_archive (and possibly
others) to cdrom, and if so, it's possible to install everything from cdrom

I have built a set of packages to test, and uploaded them to
 deb http://ftp.skolelinux.no/skolelinux sarge local

-- 
Finn-Arne Johansen
[EMAIL PROTECTED] http://bzz.no/
Leverandør av support på, drift og videreutvikling av Skolelinux-løsninger
diff -ru lessdisks-0.5.3cvs.20040906/base/usr-lib-lessdisks/lessdisks-terminal-install patched.lessdisks-0.5.3cvs.20040906/base/usr-lib-lessdisks/lessdisks-terminal-install
--- lessdisks-0.5.3cvs.20040906/base/usr-lib-lessdisks/lessdisks-terminal-install	2005-06-27 08:41:09.000000000 +0200
+++ patched.lessdisks-0.5.3cvs.20040906/base/usr-lib-lessdisks/lessdisks-terminal-install	2005-06-27 08:39:29.000000000 +0200
@@ -79,5 +79,7 @@
 fi
 
 echo 'lessdisks terminal-install done!'
-echo "hit enter to continue"
-read pause
+if [ "true" != "$lessdisks_noninteractive" ] ; then 
+  echo "hit enter to continue"
+  read pause
+fi
diff -ru lessdisks-0.5.3cvs.20040906/install/usr-sbin/lessdisks-install patched.lessdisks-0.5.3cvs.20040906/install/usr-sbin/lessdisks-install
--- lessdisks-0.5.3cvs.20040906/install/usr-sbin/lessdisks-install	2005-06-27 08:41:10.000000000 +0200
+++ patched.lessdisks-0.5.3cvs.20040906/install/usr-sbin/lessdisks-install	2005-06-27 08:38:32.000000000 +0200
@@ -594,8 +594,10 @@
 
 /usr/sbin/lessdisks-keycopy
 
-echo "lessdisks stage2 install finished. hit enter to continue"
-read pause
+if [ "true" != "$lessdisks_noninteractive" ] ; then 
+  echo "lessdisks stage2 install finished. hit enter to continue"
+  read pause
+fi
 
 # This script is unmaintained
 #booleanBox "run lessdisks-configure?" "Would you like to run \
diff -ru lessdisks-0.5.3cvs.20040906/install/usr-sbin/lessdisks-install lessdisks-patched/install/usr-sbin/lessdisks-install
--- lessdisks-0.5.3cvs.20040906/install/usr-sbin/lessdisks-install	2005-06-27 09:13:06.000000000 +0200
+++ lessdisks-patched/install/usr-sbin/lessdisks-install	2005-06-27 09:14:43.000000000 +0200
@@ -174,7 +174,13 @@
 
 # TODO support other methods...
 # someday we might support methods other than web, but for now just go with it.
-method="web"
+case $defaultarchive in 
+  cdrom)
+    method="file"
+    defaultarchive="file:///cdrom/"
+    ;;
+  *) method="web" ;;
+esac
 
 TestArchive() {
 #### get information about archive location
@@ -185,6 +191,12 @@
     archive="$defaultarchive"
   fi
   archive=`echo $archive | awk -F "http://"; '{print $1 $2}'`
+elif [ "file" = "$method" ] ; then 
+  if [ "" = "$archive" ]; then
+    echo "setting archive to default: $defaultarchive"
+    archive="$defaultarchive"
+  fi
+  archive=`echo $archive | awk -F "file://" '{print $1 $2}'`
 else
   while [ "" = "$archive" ]; do
     validarchive="no"
@@ -373,7 +385,23 @@
   # only include lessdisks archive if it is set.
   echo "deb http://$lessdisksarchive"; >> $sources_list
 fi
-echo "deb http://$defaultarchive $debian_dist main" >> $sources_list
+case "$method" in 
+  web)
+    echo "deb http://$defaultarchive $debian_dist main" >> $sources_list
+    ;;
+  file)
+    if [ "file:///cdrom/" = "$defaultarchive" ] ; then 
+      mkdir -p $lessdisks_path/cdrom
+      mount --bind /cdrom $lessdisks_path/cdrom
+      for COMP in /cdrom/dists/$debian_dist/* ; do 
+        test -e $COMP/binary-i386/Packages.gz && \
+          components="${components:+$components } $(basename $COMP)"
+      done
+      echo "deb $defaultarchive $debian_dist $components" >> $sources_list
+    fi
+    ;;
+esac
+
 if [ -n "$archive_nonus" ]; then
   echo "deb http://$archive_nonus $debian_dist/non-US main" >> $sources_list
 fi

Reply via email to