9
0
Fork 0
barebox/defaultenv/defaultenv-1/bin/init

37 lines
593 B
Bash

#!/bin/sh
PATH=/env/bin
export PATH
global hostname
. /env/config
if [ -e /dev/nor0 -a -n "$nor_parts" ]; then
addpart /dev/nor0 $nor_parts
fi
if [ -e /dev/disk0 -a -n "$disk_parts" ]; then
addpart /dev/disk0 $disk_parts
fi
if [ -e /dev/nand0 -a -n "$nand_parts" ]; then
addpart /dev/nand0 $nand_parts
fi
if [ -f /env/bin/init_board ]; then
. /env/bin/init_board
fi
if [ -f /env/bin/boot_board ]; then
. /env/bin/boot_board
elif [ -n $autoboot_timeout ]; then
echo
echo -n "Hit any key to stop autoboot: "
timeout -a $autoboot_timeout
if [ $? != 0 ]; then
exit
fi
boot
fi