mirror of
git://soft.sys114.com/odroid-stamper
synced 2025-12-19 00:18:42 +09:00
Add custom first boot script
The first boot script is the one executed when the memory card is freshly flashed and run on the board, this script is to initiate OS environment. This custom script will genenate new secure keys in /etc/ssh and back up to vendor partition using 'overlayroot' script. Change-Id: Ibe84da3e33ffc893c319a9253793037c93a250fa
This commit is contained in:
20
custom/templates/oem/overlay/root/firstboot.sh
Executable file
20
custom/templates/oem/overlay/root/firstboot.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
STAMP=/overlay/vendor/.stamp_sshkey
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
. /lib/init/vars.sh
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
if [ ! -f $STAMP ]; then
|
||||
ssh-keygen -A
|
||||
|
||||
/usr/sbin/overlay-backup vendor
|
||||
|
||||
mount -o remount,rw /overlay/vendor
|
||||
touch $STAMP
|
||||
mount -o remount,ro /overlay/vendor
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user