ltsp-update-image: /opt/ltsp/i386 is hardcoded in some places

Bug #198157 reported by laga
2
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Fix Released
Medium
Oliver Grawert

Bug Description

Title says it all. The patch is untested as I've run out of chroots..

laga@prometheus:~/dev/ltsp/ltsp-5.0.40~bzr20080212/server$ diff -u ltsp-update-image.orig ltsp-update-image
--- ltsp-update-image.orig 2008-03-03 23:01:22.777273251 +0100
+++ ltsp-update-image 2008-03-03 23:02:29.047118436 +0100
@@ -75,7 +75,7 @@
 # Find out if we are really an nbd client and if so, build the image.
 # Check and see if user's left /proc mounted in chroot. If so, issue
 # a warning, and unmount it
-PROC_MOUNTED=$(chroot /opt/ltsp/i386 test -f /proc/cpuinfo && echo True)
+PROC_MOUNTED=$(chroot ${CHROOT} test -f /proc/cpuinfo && echo True)
 if [ -n "${PROC_MOUNTED}" ]; then
     echo "/proc mounted in chroot ${CHROOT}, Unmounting."
     umount ${CHROOT}/proc

Related branches

Revision history for this message
laga (laga) wrote :

I found another smal issue in ltsp-update-image, but I don't want to open a new bug for it.

ltsp-update-image will fail if temporary files from the last run are still around. It's easy to reproduce, eg with sudo touch /opt/ltsp/images/i386.img.tmp && sudo ltsp-update-image --arch i386

Patch:

--- ltsp-update-image 2008-03-03 23:23:13.347079242 +0100
+++ ltsp-update-image.orig 2008-03-03 23:22:59.124107759 +0100
@@ -90,6 +90,7 @@

     IMAGE="${IMGDIR}/${ARCH}.img"
     rm "${IMAGE}"
+ rm "${IMAGE}.tmp"
     mksquashfs "${CHROOT}" "${IMAGE}.tmp" -e cdrom
     mv "${IMAGE}.tmp" "${IMAGE}"
     chmod 0744 "${IMAGE}"

Both rm lines will throw ugly error messages if "${IMAGE}" or "${IMAGE}.tmp" can't be found. That's good for debugging messages, but it might confuse the user. Maybe you want to redirect them to /dev/null instead?

Revision history for this message
Oliver Grawert (ogra) wrote :

a simple rm -f should help in the second case, thanks for the fix in the first case, i'll include it before final release ... please file different bugs for different issues in the future :)

Changed in ltsp:
assignee: nobody → ogra
milestone: none → ubuntu-8.04
status: New → Confirmed
Steve Langasek (vorlon)
Changed in ltsp:
importance: Undecided → Medium
milestone: ubuntu-8.04 → none
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ltsp - 5.0.40~bzr20080212-0ubuntu4

---------------
ltsp (5.0.40~bzr20080212-0ubuntu4) hardy; urgency=low

  * make sure the right proxy line is set in the chroot, thanks
    to stephane graber for that fix (LP: #213927)
  * make acpid [ i386 amd64 ] only dependency, since its not not available on ppc
    (LP: #213014, LP: #199747)
  * fix configure-x.sh interpreter line (LP: #196706)
  * make sure resolv.conf is available in the chroot (LP: #72482)
  * merge fix for dhcp port handling, thanks to Michael Haas, (LP: #198356)
  * we only tell users with nfs-kernel-server installed that they need to
    update /etc/exports (LP: #198915)
  * fix kiosk plugin to use the right package names (LP: #163278, LP: #212738)
  * fix hardcoded path in ltsp-update-image and quiten down noisy rm commands
    (LP: #198157)
  * make sure the ltsp-update-* scripts operate on symlinked dirs (LP: #151503)
  * add final updates for mythbuntu plugin and drop accidentially included
    patch file from debian/extra-plugins (LP: #212550)

 -- Oliver Grawert <email address hidden> Tue, 08 Apr 2008 15:03:51 +0200

Changed in ltsp:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.