瀏覽代碼

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
 	# 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