[arch-commits] Commit in syslinux/trunk (PKGBUILD syslinux-install_update)
Tobias Powalowski
tpowa at nymeria.archlinux.org
Thu Oct 24 12:34:52 UTC 2013
Date: Thursday, October 24, 2013 @ 14:34:50
Author: tpowa
Revision: 197227
upgpkg: syslinux 6.02-4
fix updater script, to not use symlinks. https://bbs.archlinux.org/viewtopic.php?id=171629
Modified:
syslinux/trunk/PKGBUILD
syslinux/trunk/syslinux-install_update
-------------------------+
PKGBUILD | 2 -
syslinux-install_update | 56 +++++++++++++++++++---------------------------
2 files changed, 25 insertions(+), 33 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2013-10-24 12:21:25 UTC (rev 197226)
+++ PKGBUILD 2013-10-24 12:34:50 UTC (rev 197227)
@@ -27,7 +27,7 @@
'syslinux-6.02-fix-chainloading.patch')
md5sums=('6f275813a1b08cf852e55c0a3f8fbc78'
'46ca150f53322ff8f1597d9a342f7e40'
- '0e7d47e1f791f0c5e7bd40ed5c6d80cc'
+ '8e2bf1235b00e8cdba92b3cfa6b99482'
'9dbede6b71a4de9e46aac4aad65334d7')
_build_syslinux_bios() {
Modified: syslinux-install_update
===================================================================
--- syslinux-install_update 2013-10-24 12:21:25 UTC (rev 197226)
+++ syslinux-install_update 2013-10-24 12:34:50 UTC (rev 197227)
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
#
# Syslinux Installer / Updater Script (for BIOS only)
-# Copyright (C) 2013 Matthew Gyurgyik <pyther at pyther.net>
+# Copyright (C) 2011-2013 Matthew Gyurgyik <pyther at pyther.net>
+# Copyright (C) 2013 Keshav Padram Amburay <(the) (ddoott) (ridikulus) (ddoott) (rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -18,19 +19,22 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#-----------------
+# ChangeLog:
+# 2013-10-23 : Keshav Padram Amburay : Updated script to work with Syslinux 6.02 Arch Linux pkg
+#-----------------
# Exit Codes:
# 1 - get_boot_device or other function failed
# 2 - install/update failed
# 3 - set_active failed
# 4 - install_mbr failed
-#
+#-----------------
+
shopt -s nullglob
-bios_libpath="/usr/lib/syslinux/bios/"
-bios_bootpath="/boot/syslinux/"
+bios_libpath="/usr/lib/syslinux/bios"
+bios_bootpath="/boot/syslinux"
EXTLINUX="/usr/bin/extlinux"
-bios_core_modules=(config.c32 chain.c32 ldlinux.c32 libcom32.c32 libgpl.c32 liblua.c32 libmenu.c32 libutil.c32 linux.c32 menu.c32 vesamenu.c32)
bios_autoupdate_file="/boot/syslinux/SYSLINUX_AUTOUPDATE"
pciids_file="/usr/share/hwdata/pci.ids"
@@ -294,26 +298,14 @@
}
install_modules() {
- # Copy all com32 files to /boot
- for file in "${bios_libpath}"/*.c32; do
- file=${file##*/}
- rm "$bios_bootpath/$file" &> /dev/null
- if [[ "$boot" = root ]]; then
- # Symlink files if /boot resides on the same partition as root
- ln -sf "${bios_libpath#$CHROOT}/$file" "$bios_bootpath/$file" &> /dev/null
- elif [[ "$boot" = boot ]]; then
- cp "$bios_libpath/$file" "$bios_bootpath/$file"
- fi
- done
+ # Copy all syslinux *.c32 modules to /boot
+ rm "$bios_bootpath"/*.c32 &> /dev/null
+ cp "$bios_libpath"/*.c32 "$bios_bootpath"/ &> /dev/null
# Copy / Symlink pci.ids if pci.ids exists on the FS
- if [[ -f $pciids_file ]]; then
+ if [[ -f "$pciids_file" ]]; then
rm "$bios_bootpath/pci.ids" &> /dev/null
- if [[ "$boot" = root ]]; then
- ln -sf "$pciids_file" "$bios_bootpath/pci.ids" &> /dev/null
- elif [[ "$boot" = boot ]]; then
- cp "$pciids_file" "$bios_bootpath/pci.ids" &> /dev/null
- fi
+ cp "$pciids_file" "$bios_bootpath/pci.ids" &> /dev/null
fi
}
@@ -320,8 +312,8 @@
_install() {
install_modules
- if device_is_raid "$bootpart"; then
- echo "Detected RAID on /boot"
+ if device_is_raid "$bootpart" ; then
+ echo "Detected RAID on /boot - installing Syslinux with --raid"
"$EXTLINUX" --install "$bios_bootpath" --raid &> /dev/null
else
"$EXTLINUX" --install "$bios_bootpath" &> /dev/null
@@ -340,8 +332,8 @@
update() {
install_modules
- if device_is_raid $bootpart; then
- echo "Detected RAID on /boot"
+ if device_is_raid "$bootpart" ; then
+ echo "Detected RAID on /boot - installing Syslinux with --raid"
"$EXTLINUX" --update "$bios_bootpath" --raid &> /dev/null
else
"$EXTLINUX" --update "$bios_bootpath" &> /dev/null
@@ -404,6 +396,12 @@
exit 0
fi
+# Display Usage Information if both Install and Update are passed
+if [[ $INSTALL && $UPDATE ]]; then
+ usage
+ exit 1
+fi
+
# Make sure only root can run our script
if (( $(id -u) != 0 )); then
echo "This script must be run as root" 1>&2
@@ -410,12 +408,6 @@
exit 1
fi
-# Display Usage Information if both Install and Update are passed
-if [[ $INSTALL && $UPDATE ]]; then
- usage
- exit 1
-fi
-
# If a chroot dir is path set variables to reflect chroot
if [[ "$CHROOT" ]]; then
bios_libpath="$CHROOT$bios_libpath"
More information about the arch-commits
mailing list