Преглед изворни кода

Two stage initial setup for generic images

Bob Mottram пре 9 година
родитељ
комит
ec1c284069
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8
    1
      src/freedombone-image-customise

+ 8
- 1
src/freedombone-image-customise Прегледај датотеку

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