diff -Nru ltsp-5.3.2/debian/changelog ltsp-5.3.2/debian/changelog --- ltsp-5.3.2/debian/changelog 2012-02-23 19:21:59.000000000 +0000 +++ ltsp-5.3.2/debian/changelog 2012-02-27 19:38:06.000000000 +0000 @@ -1,3 +1,14 @@ +ltsp (5.3.2-0ubuntu2) precise; urgency=low + + * ltsp-live: Don't crash when no network interface is available. + (LP: #936939) + * ltsp-live: Update for LTSP 5.3, use NBD named mounts instead of the + old nbd-server on port 2000, also install ldm-server and start inetd. + This is all required to get a clean LTSP 5.3 boot instead of getting + stuck in the initrd. + + -- Stéphane Graber Mon, 27 Feb 2012 14:38:05 -0500 + ltsp (5.3.2-0ubuntu1) precise; urgency=low [ Stéphane Graber ] diff -Nru ltsp-5.3.2/debian/scripts/ltsp-live ltsp-5.3.2/debian/scripts/ltsp-live --- ltsp-5.3.2/debian/scripts/ltsp-live 2012-02-23 19:17:26.000000000 +0000 +++ ltsp-5.3.2/debian/scripts/ltsp-live 2012-02-27 19:12:01.000000000 +0000 @@ -86,7 +86,7 @@ retval=listdev.wait() if retval != 0: - return False + return [] else: for line in listdev.stdout.readlines(): fields=str(line).strip().split(':') @@ -122,7 +122,7 @@ # Install the needed packages status = _("Installing the required packages") - cmd=["apt-get", "install", "--no-install-recommends", "-qq", "-y", "ltsp-server", "openssh-server"] + cmd=["apt-get", "install", "--no-install-recommends", "-qq", "-y", "ltsp-server", "openssh-server", "ldm-server"] runcmd=subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) runcmd.wait() @@ -136,8 +136,8 @@ runcmd.wait() # Kill inetd as it's not needed anyway - status = _("Killing openbsd-inetd") - cmd=["killall","inetd"] + status = _("Restarting openbsd-inetd") + cmd=["/etc/init.d/openbsd-inetd","restart"] runcmd=subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) runcmd.wait() @@ -160,6 +160,15 @@ ltsconf.write("LDM_THEME=edubuntu\n") ltsconf.close() + # NBD + nbdconf=open("/etc/nbd-server/conf.d/ltsp.conf","w+") + nbdconf.write(""" +[ltsp] +exportname = /cdrom/ltsp/i386.img +readonly = true +""") + nbdconf.close() + # Create LTSP Guest users status = _("Creating the guest users") newusers=open("/tmp/userlist","w+") @@ -212,9 +221,14 @@ runcmd=subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) runcmd.wait() + # Configure tftp + cmd=["sed", "-i", "s/vt.handoff=7/vt.handoff=7 nbdroot=:ltsp/g", "/var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default"] + runcmd=subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + runcmd.wait() + # Start nbd-server status = _("Starting NBD server") - cmd=["nbd-server", "2000", "/cdrom/ltsp/i386.img"] + cmd=["/etc/init.d/nbd-server", "start"] runcmd=subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) runcmd.wait() @@ -259,7 +273,7 @@ return True new_devices = list_devices() - if not new_devices: + if not new_devices and len(devices) != 0: return True devices.clear()