Two stage initial setup for generic images
This commit is contained in:
parent
9b3263767c
commit
ec1c284069
|
@ -193,7 +193,7 @@ create_generic_image() {
|
||||||
# The presence of this file indicates that the initial
|
# The presence of this file indicates that the initial
|
||||||
# setup has not yet been completed
|
# setup has not yet been completed
|
||||||
touch $rootdir/home/$MY_USERNAME/.initial_setup
|
touch $rootdir/home/$MY_USERNAME/.initial_setup
|
||||||
|
touch $rootdir/home/root/.bashrc
|
||||||
|
|
||||||
cat >> $rootdir/home/$MY_USERNAME/.bashrc <<EOF
|
cat >> $rootdir/home/$MY_USERNAME/.bashrc <<EOF
|
||||||
# initial setup of the system
|
# initial setup of the system
|
||||||
|
@ -205,7 +205,14 @@ if [ -f ~/.initial_setup ]; then
|
||||||
echo 'your system will be insecure. Your password should be at least 10'
|
echo 'your system will be insecure. Your password should be at least 10'
|
||||||
echo 'characters long and contain letters and numbers. Do this now:'
|
echo 'characters long and contain letters and numbers. Do this now:'
|
||||||
passwd
|
passwd
|
||||||
|
rm ~/.initial_setup
|
||||||
sudo su
|
sudo su
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >> $rootdir/home/root/.bashrc <<EOF
|
||||||
|
# initial setup of the system
|
||||||
|
if [ -f ~/.initial_setup ]; then
|
||||||
freedombone menuconfig
|
freedombone menuconfig
|
||||||
rm ~/.initial_setup
|
rm ~/.initial_setup
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue