2016-07-25 14:08:53 +00:00
|
|
|
#!/bin/ash
|
2016-08-01 02:39:07 +00:00
|
|
|
# First thing it is vital to mount the /dev and other system directories
|
2017-03-30 21:12:22 +00:00
|
|
|
mkdir /proc /sys /dev /tmp /boot 2>&- 1>&-
|
2016-08-01 02:39:07 +00:00
|
|
|
mount -t devtmpfs none /dev
|
|
|
|
mount -t proc none /proc
|
|
|
|
mount -t sysfs none /sys
|
|
|
|
|
|
|
|
# Now it is safe to print a banner
|
2016-07-28 04:08:33 +00:00
|
|
|
echo '====================================================='
|
|
|
|
echo ' _ _ _ ____ ___ __ __ '
|
|
|
|
echo '| | | | ___ __ _ __| |___ _ | _ \ / _ \| \/ |'
|
|
|
|
echo '| |_| |/ _ \/ _` |/ _` / __| (_) | |_) | | | | |\/| |'
|
|
|
|
echo '| _ | __/ (_| | (_| \__ \ _ | _ <| |_| | | | |'
|
|
|
|
echo '|_| |_|\___|\__,_|\__,_|___/ (_) |_| \_\\___/|_| |_|'
|
|
|
|
echo ''
|
|
|
|
echo '====================================================='
|
2016-07-25 14:08:53 +00:00
|
|
|
|
2016-08-01 02:39:07 +00:00
|
|
|
# Load the date from the hardware clock, setting it in local time
|
|
|
|
hwclock -l -s
|
|
|
|
|
|
|
|
# Verify the user's TPM secret
|
2016-09-09 21:24:52 +00:00
|
|
|
echo "TPM TOTP:"
|
|
|
|
if ! unsealtotp.sh ; then
|
2016-08-14 20:00:34 +00:00
|
|
|
echo '!!!!!'
|
|
|
|
echo '!!!!! TPM TOTP secret not found.'
|
|
|
|
echo '!!!!! This firmware can not be trusted.'
|
|
|
|
echo '!!!!!'
|
2016-08-01 02:39:07 +00:00
|
|
|
fi
|
2016-09-09 21:24:52 +00:00
|
|
|
echo
|
2017-03-27 22:03:09 +00:00
|
|
|
|
2016-08-01 02:39:07 +00:00
|
|
|
# Start an interactive shell
|
2016-10-26 19:11:12 +00:00
|
|
|
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
2016-07-25 14:08:53 +00:00
|
|
|
exec /bin/ash
|