syslinux(-common) no longer ships pxelinux.0, included in pxelinux now
authorMichael Prokop <mika@grml.org>
Wed, 23 Sep 2015 19:59:11 +0000 (21:59 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 23 Sep 2015 19:59:56 +0000 (21:59 +0200)
pxelinux package is available since Debian/jessie, so
support on either the pxelinux or older versions of
syslinux-common (which used to ship the pxelinux.0 file).

debian/control
grml-terminalserver

index 3fe4e8f..44c5ed7 100644 (file)
@@ -20,7 +20,7 @@ Depends: atftpd (>=0.7.dfsg-1.2),
          ipcalc,
          isc-dhcp-server | dhcp3-server,
          nfs-kernel-server,
-         syslinux,
+         pxelinux | syslinux-common (<= 2:4.05+dfsg-6+deb7u1),
          ${misc:Depends}
 Description: terminalserver for grml to boot via PXE
  These packages provides all what's needed to boot
index 1ce20ca..3fcfa37 100755 (executable)
@@ -209,7 +209,11 @@ function createTftpConf
   removeTftpConf
 
   execute "mkdir -p $TFTPD_DATA_DIR_/pxelinux.cfg" die
-  execute "install -m 644 /usr/lib/syslinux/pxelinux.0 $TFTPD_DATA_DIR_" die
+  if [ -r /usr/lib/PXELINUX/pxelinux.0 ] ; then
+    execute "install -m 644 /usr/lib/PXELINUX/pxelinux.0 $TFTPD_DATA_DIR_" die
+  else # older versions of syslinux-common (<= 2:4.05+dfsg-6+deb7u1):
+    execute "install -m 644 /usr/lib/syslinux/pxelinux.0 $TFTPD_DATA_DIR_" die
+  fi
   if [ -d "$MOUNT_POINT_"/boot/release ] ; then
     cp -r "$MOUNT_POINT_"/boot/release "$TFTPD_DATA_DIR_"
   fi