File tree Expand file tree Collapse file tree 4 files changed +21
-35
lines changed
Expand file tree Collapse file tree 4 files changed +21
-35
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,19 @@ THIS=$(basename $0)
44
55case " $1 " in
66 start)
7- if [ ! -f /.first_boot ]; then
7+
8+ # Check is SWAP partition already created
9+ sgdisk /dev/mmcblk0 | grep swap
10+ if [ $? -ne 0 ]; then
11+ first_boot
12+ exit $?
13+ fi
14+
15+ # Check is share partition already created
16+ sgdisk /dev/mmcblk0 | grep share
17+ if [ $? -eq 0 ]; then
818 first_boot
19+ exit $?
920 fi
1021 ;;
1122 stop)
Original file line number Diff line number Diff line change @@ -169,8 +169,6 @@ notif " 9/9 COPY FILES TO ^ USB PARTITION"
169169copy_files_to_store_partition
170170
171171notif " FIRST BOOT SETUP FINISHED!"
172- rw
173- touch /.first_boot
174- ro
172+
175173sleep 1
176174clear_notif
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ mount_share () {
4848 fi
4949
5050 # Create the directory structure if required
51- (cd /mnt; mkdir -p " Atari lynx" " Game Boy" " Game Boy Color" " Game Boy Advance" " Game Gear" " Neo Geo Pocket" " NES" " PS1" " Sega Genesis" " Sega Master System" " SNES" " WonderSwan" " PCE-TurboGrafx" )
51+ (cd /mnt; mkdir -p " Atari lynx" " Game Boy" " Game Boy Color" " Game Boy Advance" " Game Gear" " Neo Geo Pocket" " NES" " PS1" " PS1/bios " " Sega Genesis" " Sega Master System" " SNES" " WonderSwan" " PCE-TurboGrafx" )
5252
5353 # Check if there is a firmware update file
5454 if [ -f /mnt/FunKey-* .fwu ]; then
Original file line number Diff line number Diff line change @@ -9,44 +9,21 @@ root_mount=/tmp/rootfs
99
1010do_preinst ()
1111{
12- notif " 1/5 EXTRACT FIRMWARE UPDATE.."
12+ notif " 1/3 EXTRACT FIRMWARE UPDATE..^DO NOT TURN OFF THE CONSOLE "
1313 exit 0
1414}
1515
1616do_postinst ()
1717{
18- local version
19-
20- notif " 2/5 RESIZE ROOT FILESYSTEM"
18+ notif " 2/3 RESIZE ROOT FILESYSTEM^DO NOT TURN OFF THE CONSOLE"
2119 resize2fs ${root_part}
2220 if [ $? -ne 0 ]; then
23- notif " CANNOT RESIZE ROOT FILESYSTEM"
24- exit 1
25- fi
26- notif " 3/5 MOUNT ROOT FILESYSTEM"
27- mkdir -p ${root_mount}
28- mount -t ext4 ${root_part} ${root_mount}
29- if [ $? -ne 0 ]; then
30- notif " CANNOT MOUNT ROOT FILESYSTEM"
31- exit 1
32- fi
33- sgdisk /dev/mmcblk0 | grep swap
34- if [ $? -eq 0 ]; then
35- sgdisk /dev/mmcblk0 | grep share
36- if [ $? -eq 0 ]; then
37- touch $[root_mount]/.first_boot
38- fi
39- fi
40- notif " 4/5 UNMOUNT ROOT FILESYSTEM"
41- touch " ${root_mount} /.first_boot"
42- umount ${root_mount}
43- if [ $? -ne 0 ]; then
44- notif " CANNOT UNMOUNT ROOT FILESYSTEM"
45- exit 1
21+ notif " CANNOT RESIZE ROOT ^FILESYSTEM"
22+ exit 1
4623 fi
47- for file in $( ls /mnt/FunKey-rootfs- * .fwu) ; do
48- notif " 5/5 ERASE UPDATE FILE"
49- rm -f " ${file} "
24+ for file in $( ls /mnt/FunKey-* .fwu) ; do
25+ notif " 3/3 ERASE UPDATE FILE^DO NOT TURN OFF THE CONSOLE "
26+ rm -f " ${file} "
5027 done
5128 exit 0
5229}
You can’t perform that action at this time.
0 commit comments