[arch-commits] CVS update of extra/system/mkpxelinux (4 files)
Tobias Powalowski
tpowa at archlinux.org
Thu Mar 27 19:00:12 UTC 2008
Date: Thursday, March 27, 2008 @ 15:00:12
Author: tpowa
Path: /home/cvs-extra/extra/system/mkpxelinux
Modified: PKGBUILD (1.9 -> 1.10) boot.msg (1.2 -> 1.3)
mkpxelinux (1.7 -> 1.8) mkpxelinux.conf (1.3 -> 1.4)
'upgpkg: update to new version'
-----------------+
PKGBUILD | 14 ++++++++------
boot.msg | 1 +
mkpxelinux | 25 +++++++++++++++++++++----
mkpxelinux.conf | 6 +++++-
4 files changed, 35 insertions(+), 11 deletions(-)
Index: extra/system/mkpxelinux/PKGBUILD
diff -u extra/system/mkpxelinux/PKGBUILD:1.9 extra/system/mkpxelinux/PKGBUILD:1.10
--- extra/system/mkpxelinux/PKGBUILD:1.9 Mon Oct 1 13:59:43 2007
+++ extra/system/mkpxelinux/PKGBUILD Thu Mar 27 15:00:10 2008
@@ -1,14 +1,14 @@
-# $Id: PKGBUILD,v 1.9 2007/10/01 17:59:43 tpowa Exp $
+# $Id: PKGBUILD,v 1.10 2008/03/27 19:00:10 tpowa Exp $
# Maintainer : Tobias Powalowski <tpowa at archlinux.org>
pkgname=mkpxelinux
-pkgver=0.2
+pkgver=2008.03
pkgrel=1
pkgdesc="Advanced, modular network pxe boot image creation utility"
arch=(i686 x86_64)
url="http://www.archlinux.org/"
depends=('mkinitcpio' 'tftp-hpa' 'dhcp' 'syslinux')
-source=('boot.msg' 'mkpxelinux' 'mkpxelinux.conf')
+source=('boot.msg' 'mkpxelinux' 'mkpxelinux.conf' 'options.msg')
backup=(etc/mkpxelinux.conf)
build()
@@ -17,7 +17,9 @@
install -D -m755 mkpxelinux $startdir/pkg/usr/sbin/mkpxelinux
install -D -m644 mkpxelinux.conf $startdir/pkg/etc/mkpxelinux.conf
install -D -m644 boot.msg $startdir/pkg/usr/share/mkpxelinux/boot.msg
+ install -D -m644 options.msg $startdir/pkg/usr/share/mkpxelinux/options.msg
}
-md5sums=('009417c537fc263e6941f3198fd2c3ed'
- '380d0656bf8b269cf452d394effe97bb'
- '0fee1a0eed35b8e7d40dac2d6e917967')
+md5sums=('f4a30ab94fdc1974f4fbdfd7235ca512'
+ '82fe26ac9a6ab16bf6b04aa1efc9f910'
+ 'f1e8fd8c8e2d0b75a33356823ca17d90'
+ 'fa078942b8adf261e4d925e080dc3018')
Index: extra/system/mkpxelinux/boot.msg
diff -u extra/system/mkpxelinux/boot.msg:1.2 extra/system/mkpxelinux/boot.msg:1.3
--- extra/system/mkpxelinux/boot.msg:1.2 Sat May 13 08:41:12 2006
+++ extra/system/mkpxelinux/boot.msg Thu Mar 27 15:00:12 2008
@@ -9,5 +9,6 @@
If you wish to change your defaults to boot into your existing system,
type 'vmlinuz initrd=initrd.img <any_other_boot_option>'
+Use the F2 key for troubleshooting and options.
------------------------------------------------------------------------------
Index: extra/system/mkpxelinux/mkpxelinux
diff -u extra/system/mkpxelinux/mkpxelinux:1.7 extra/system/mkpxelinux/mkpxelinux:1.8
--- extra/system/mkpxelinux/mkpxelinux:1.7 Mon Oct 1 13:59:43 2007
+++ extra/system/mkpxelinux/mkpxelinux Thu Mar 27 15:00:12 2008
@@ -34,6 +34,11 @@
fi
. "${CONFIG}"
+# export for mkinitcpio
+[ -n "${APPENDBOOTMESSAGE}" ] && export APPENDBOOTMESSAGE
+[ -n "${APPENDBOOTMESSAGE_SYSLINUX}" ] && export APPENDBOOTMESSAGE_SYSLINUX
+[ -n "${APPENDBOOTMESSAGE_SYSLINUX_LOWMEM}" ] && export APPENDBOOTMESSAGE_SYSLINUX_LOWMEM
+[ -n "${APPENDOPTIONSBOOTMESSAGE}" ] && export APPENDOPTIONSBOOTMESSAGE
if [ "${INSTALLDIR}" = "" ]; then
echo "ERROR: No INSTALLDIR name specified, please use the -d option"
@@ -48,28 +53,40 @@
! [ -e ${INSTALLDIR} ] && echo "No ${INSTALLDIR} found!" && exit 1
export TEMPDIR=${NFSROOTDIR}
export INSTALLDIR=${INSTALLDIR}
-export RUNPROGRAM="$(echo $0 | awk -F/ '{print $4}')"
+export RUNPROGRAM="${APPNAME}"
[ "${BOOTMESSAGE}" = "" ] && export BOOTMESSAGE=$(mktemp /tmp/bootmessage.XXXX)
+[ "${OPTIONSBOOTMESSAGE}" = "" ] && export OPTIONSBOOTMESSAGE=$(mktemp /tmp/optionsbootmessage.XXXX)
export USEKERNEL=${VERSION}
# begin script
# create default
echo ":: Creating pxelinux default config file ..."
- mkdir -p ${INSTALLDIR}/pxelinux.cfg
+mkdir -p ${INSTALLDIR}/pxelinux.cfg
+if [ "${PXELINUX_DEFAULT}" = "" ]; then
[ -e ${INSTALLDIR}/pxelinux.cfg/default ] && rm ${INSTALLDIR}/pxelinux.cfg/default
echo "prompt ${PROMPT}" >> ${INSTALLDIR}/pxelinux.cfg/default
echo "timeout ${TIMEOUT}" >> ${INSTALLDIR}/pxelinux.cfg/default
echo "display boot.msg" >> ${INSTALLDIR}/pxelinux.cfg/default
+ echo "F1 boot.msg" >> ${INSTALLDIR}/pxelinux.cfg/default
+ echo "F2 options.msg" >> ${INSTALLDIR}/pxelinux.cfg/default
echo "default arch" >> ${INSTALLDIR}/pxelinux.cfg/default
echo "label arch" >> ${INSTALLDIR}/pxelinux.cfg/default
echo "kernel vmlinuz" >> ${INSTALLDIR}/pxelinux.cfg/default
echo "append initrd=initrd.img ${KERNEL_BOOT_OPTIONS}" >> ${INSTALLDIR}/pxelinux.cfg/default
- echo ":: Calling mkinitcpio CONFIG=${MKINITCPIO_CONFIG} KERNEL=${VERSION} ..."
+else
+ sed "s|@@PROMPT@@|${PROMPT}|g;s|@@TIMEOUT@@|${TIMEOUT}|g;s|@@KERNEL_BOOT_OPTIONS@@|${KERNEL_BOOT_OPTIONS}|g" \
+ ${PXELINUX_DEFAULT} > ${INSTALLDIR}/pxelinux.cfg/default
+fi
+[ ! -s ${INSTALLDIR}/pxelinux.cfg/default ] && echo "No pxelinux default config found" && exit 1
+echo ":: Calling mkinitcpio CONFIG=${MKINITCPIO_CONFIG} KERNEL=${VERSION} ..."
# generate initramdisk
echo ":: Creating initramdisk ..."
mkinitcpio -c ${MKINITCPIO_CONFIG} -k ${VERSION} -g ${INSTALLDIR}/initrd.img
echo ":: Using ${KERNEL} as image kernel ..."
install -m644 ${KERNEL} ${INSTALLDIR}/vmlinuz
-echo ":: Installing message file to ${INSTALLDIR} ..."
+echo ":: Installing message files to ${INSTALLDIR} ..."
install -m644 ${BOOTMESSAGE} ${INSTALLDIR}/boot.msg
+ install -m644 ${OPTIONSBOOTMESSAGE} ${INSTALLDIR}/options.msg
+ [ ! -s ${INSTALLDIR}/boot.msg ] && echo 'ERROR:no boot.msg found, aborting!' && exit 1
+ [ ! -s ${INSTALLDIR}/options.msg ] && echo 'ERROR:no options.msg found, aborting!' && exit 1
echo ":: Installing PXELINUX to ${INSTALLDIR} ..."
install -m644 /usr/lib/syslinux/pxelinux.0 ${INSTALLDIR}/pxelinux.0 && echo "Installation completed."
Index: extra/system/mkpxelinux/mkpxelinux.conf
diff -u extra/system/mkpxelinux/mkpxelinux.conf:1.3 extra/system/mkpxelinux/mkpxelinux.conf:1.4
--- extra/system/mkpxelinux/mkpxelinux.conf:1.3 Mon Jul 24 05:34:13 2006
+++ extra/system/mkpxelinux/mkpxelinux.conf Thu Mar 27 15:00:12 2008
@@ -15,8 +15,12 @@
# kernel image, defaulted to stock arch kernel
KERNEL="/boot/vmlinuz26"
-# boot message file
+# boot message files
BOOTMESSAGE="/usr/share/mkpxelinux/boot.msg"
+OPTIONSBOOTMESSAGE="/usr/share/mkpxelinux/options.msg"
+
+pxelinux default config file to use
+PXELINUX_DEFAULT=""
# Prompt on boot, defaulted to yes, 1=yes 0=no
PROMPT="1"
More information about the arch-commits
mailing list