Changeset 36133


Ignore:
Timestamp:
2013-03-27T13:39:42+01:00 (5 years ago)
Author:
jogo
Message:

base-files: firstboot: only ask for confirmation on TTY

Also allow '-y' to force the reset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/base-files/files/sbin/firstboot

    r35712 r36133  
    2222        boot_run_hook switch2jffs 
    2323    else 
    24         local input 
     24        if [ -t 0 ] && [ "$1" != "-y" ]; then 
     25                local input 
    2526 
    26         echo -n  "firstboot will erase all settings and remove any installed packages. Are you sure? [N/y]" 
    27         read input 
    28         [ "$input" = "y" ] || [ "$input" = "Y" ] || return 0 
     27                echo -n "firstboot will erase all settings and remove any installed packages. Are you sure? [N/y]" 
     28                read input 
     29                [ "$input" = "y" ] || [ "$input" = "Y" ] || return 0 
     30        fi 
    2931 
    3032        if [ -n "$jffs" ]; then 
Note: See TracChangeset for help on using the changeset viewer.