Pārlūkot izejas kodu

Two stage initial setup for generic images

Bob Mottram 9 gadus atpakaļ
vecāks
revīzija
ec1c284069
1 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 8
    1
      src/freedombone-image-customise

+ 8
- 1
src/freedombone-image-customise Parādīt failu

193
 	# The presence of this file indicates that the initial
193
 	# The presence of this file indicates that the initial
194
 	# setup has not yet been completed
194
 	# setup has not yet been completed
195
     touch $rootdir/home/$MY_USERNAME/.initial_setup
195
     touch $rootdir/home/$MY_USERNAME/.initial_setup
196
-
196
+    touch $rootdir/home/root/.bashrc
197
    
197
    
198
 	cat >> $rootdir/home/$MY_USERNAME/.bashrc <<EOF
198
 	cat >> $rootdir/home/$MY_USERNAME/.bashrc <<EOF
199
 # initial setup of the system
199
 # initial setup of the system
205
     echo 'your system will be insecure. Your password should be at least 10'
205
     echo 'your system will be insecure. Your password should be at least 10'
206
     echo 'characters long and contain letters and numbers. Do this now:'
206
     echo 'characters long and contain letters and numbers. Do this now:'
207
     passwd
207
     passwd
208
+    rm ~/.initial_setup
208
     sudo su
209
     sudo su
210
+fi
211
+EOF
212
+
213
+	cat >> $rootdir/home/root/.bashrc <<EOF
214
+# initial setup of the system
215
+if [ -f ~/.initial_setup ]; then
209
     freedombone menuconfig
216
     freedombone menuconfig
210
     rm ~/.initial_setup
217
     rm ~/.initial_setup
211
 fi
218
 fi