1 # we are using the fact that this is a sourced sh script to take over and
2 # handle updating ourselves. config is static and does not need changes.
7 # replicate existing script
9 if [ "$verbose" = "0" ]; then
17 echo "WARNING:" $@ >&2
26 echo "usage: $0 [-v|--verbose] [--warn-only]"
29 # NOTE: no-op for most options
30 while [ $# -gt 0 ]; do
50 src=/usr/share/syslinux/efi64
52 everbose "Installing binaries from $src to $boot"
53 cp $src/*.c32 $src/ldlinux.e64 $boot
54 cp $src/syslinux.efi $boot/bootx64.efi
56 ids=/usr/share/hwdata/pci.ids
58 apkargs="-q --no-progress"
59 if ! apk info -e hwids-pci >/dev/null; then
60 everbose "Installing hwids-pci"
61 if apk $apkargs add hwids-pci; then
65 Unable to install hwids-pci! If update-extlinux is
66 being called from syslinux hook during
67 installation/upgrade, you will need to run
68 update-extlinux after the apk database is unlocked.
69 Alternatively, install hwids-pci manually before
70 upgrading boot-related packages.
75 everbose "Upgrading hwids-pci"
76 if ! apk $apkargs upgrade hwids-pci; then
77 ewarn "Upgrade failed for hwids-pci, pci.ids may be out of date"
80 if [ ! -r "$ids" ]; then
81 ewarn "Cannot read $ids, can't update $boot/$bootids"
83 everbose "Installing $ids to $boot/$bootids"
84 cp $ids $boot/$bootids
86 if [ -n "$undo_hwids" ]; then
87 everbose "Deleting hwids-pci"
88 apk $apkargs del hwids-pci
91 # exit from parent script