Skip to content

Commit

Permalink
new test if install should not be performed
Browse files Browse the repository at this point in the history
install into / is forbidden,
Beep only during initial installation
  • Loading branch information
Thomas Lange committed Jul 18, 2016
1 parent 77e0c5e commit cec0021
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/subroutines
Expand Up @@ -359,14 +359,16 @@ task_action() {
echo "FAI_ACTION: $FAI_ACTION"
case $FAI_ACTION in
install)
if [ $do_init_tasks -eq 0 ]; then
if [ $target = "/" ]; then
echo "Cowardly refusing to run a FAI installation on a running system."
return
fi
echo Performing FAI installation. All data may be overwritten!
echo -ne "\a"; sleep 1
echo -ne "\a"; sleep 1
echo -e "\a"; sleep 5
if [ $do_init_tasks -eq 1 ] ; then
echo -ne "\a"; sleep 1
echo -ne "\a"; sleep 1
echo -e "\a"; sleep 5
fi
task install
task faiend
;;
Expand Down

0 comments on commit cec0021

Please sign in to comment.