mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-23 23:02:26 +00:00
eda24d85bf
Busybox no longer has CONFIG_BASH since we are deploying bash on most boards. We also should clearly indicate which scripts cannot use bashisms. Change shebang in x230-flash.init, t430-flash.init, flash.sh to /bin/ash. Execute /bin/sh for interactive shells. Move key functions needed by those scripts to initrd/etc/ash_functions. Source ash_functions instead of functions in those scripts, so any bashisms in other functions won't break parsing of the script in ash. Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
29 lines
615 B
Bash
Executable File
29 lines
615 B
Bash
Executable File
#!/bin/ash
|
|
# Initialize the USB and network device drivers,
|
|
# invoke a recovery shell and prompt the user for how to proceed
|
|
|
|
. /etc/ash_functions
|
|
. /tmp/config
|
|
|
|
TRACE "Under /bin/x230-flash.init"
|
|
|
|
insmod /lib/modules/ehci-hcd.ko
|
|
insmod /lib/modules/ehci-pci.ko
|
|
insmod /lib/modules/xhci-hcd.ko
|
|
insmod /lib/modules/xhci-pci.ko
|
|
insmod /lib/modules/e1000e.ko
|
|
insmod /lib/modules/usb-storage.ko
|
|
|
|
tpmr extend -ix 4 -ic recovery
|
|
sleep 2
|
|
|
|
echo '***** Starting recovery shell'
|
|
echo ''
|
|
echo 'To install from flash drive:'
|
|
echo ''
|
|
echo ' mount -o ro /dev/sdb1 /media'
|
|
echo ' flash.sh /media/x230.rom'
|
|
echo ''
|
|
|
|
exec /bin/sh
|