diff options
author | madmonkey <madfkingmonkey@gmail.com> | 2017-02-19 12:36:23 +0300 |
---|---|---|
committer | madmonkey <madfkingmonkey@gmail.com> | 2017-02-19 12:36:23 +0300 |
commit | 7038c0f86758cb9cae45a47d20087c99aba1605c (patch) | |
tree | 87ea5a8bf424f66ba7357ee3f977ca717a2e7dfa | |
parent | b323d7b3e32b697bc4f8d08c37c8e6c8673cd152 (diff) |
fixes
-rwxr-xr-x[-rw-r--r--] | bin/hmodunpack | 1 | ||||
-rwxr-xr-x | bin/makeimg | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | bin/makepack | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | mod/hakchi/rootfs/bin/chmenu | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | mod/hakchi/rootfs/bin/clover-kachikachi-wr | 0 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit | 2 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/b0010_functions | 14 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/p0000_config | 2 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/p7000_preinit | 1 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/p7100_preinit | 8 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/pa100_games | 2 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock | 2 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/pffff_config | 2 | ||||
-rw-r--r-- | mod/hakchi/script/base | 1 | ||||
-rw-r--r-- | mod/hakchi/script/transfer | 3 |
15 files changed, 29 insertions, 32 deletions
diff --git a/bin/hmodunpack b/bin/hmodunpack index 6f5f1d2..fd7ed72 100644..100755 --- a/bin/hmodunpack +++ b/bin/hmodunpack @@ -4,6 +4,7 @@ input=$(cd $(dirname "$1");pwd)/$(basename "$1") [ -f "$input" ] || exit 1 ext=.hmod +name=$(basename "$input" .tgz) name=$(basename "$input" $ext) output=$(pwd)/$name diff --git a/bin/makeimg b/bin/makeimg index 4f3a5f4..3718a5f 100755 --- a/bin/makeimg +++ b/bin/makeimg @@ -9,8 +9,8 @@ fi infile=$(basename "$inpath").img img=./$infile -rm -rf "$inpath/initramfs/hakchi/transfer" -(cd "$inpath/../mod";cp -a * "../$inpath/initramfs/") +rm -rf "$inpath/initramfs/hakchi" +rsync -a "$inpath/../mod/" "$inpath/initramfs/" if [ "$2" == "notx" ]; then rm -rf "$inpath/initramfs/hakchi/transfer" fi diff --git a/bin/makepack b/bin/makepack index 0435c0f..0435c0f 100644..100755 --- a/bin/makepack +++ b/bin/makepack diff --git a/mod/hakchi/rootfs/bin/chmenu b/mod/hakchi/rootfs/bin/chmenu index a448234..b5d76c6 100644..100755 --- a/mod/hakchi/rootfs/bin/chmenu +++ b/mod/hakchi/rootfs/bin/chmenu @@ -5,8 +5,8 @@ script_init state_file=$installpath/menu [ -z "$1" ] && exit 1 -prev_code=$(cat "$state_file") -[ "$1" == "$prev_code" ] && exit 0 +[ -f "$state_file" ] && prev_code=$(cat "$state_file") || prev_code=000 +[ "$1" == "$prev_code" ] && exit 1 echo Switching to menu $1 if [ "$1" == "000" ]; then @@ -19,11 +19,14 @@ fi echo $1 > "$state_file" echo New directory: $targetpath -if [ ! -f "$targetpath/title.fnt" ]; then - ln -s "$rootfs$gamepath/title.fnt" "$targetpath/title.fnt" -fi -if [ ! -f "$targetpath/copyright.fnt" ]; then - ln -s "$rootfs$gamepath/copyright.fnt" "$targetpath/copyright.fnt" + +if [ "$1" != "000" ]; then + if [ ! -f "$targetpath/title.fnt" ]; then + ln -s "$rootfs$gamepath/title.fnt" "$targetpath/title.fnt" + fi + if [ ! -f "$targetpath/copyright.fnt" ]; then + ln -s "$rootfs$gamepath/copyright.fnt" "$targetpath/copyright.fnt" + fi fi pkill -KILL clover-mcp @@ -31,4 +34,4 @@ pkill -KILL ReedPlayer-Clover overmount_games -clover-mcp +exec clover-mcp diff --git a/mod/hakchi/rootfs/bin/clover-kachikachi-wr b/mod/hakchi/rootfs/bin/clover-kachikachi-wr index d8ff989..d8ff989 100644..100755 --- a/mod/hakchi/rootfs/bin/clover-kachikachi-wr +++ b/mod/hakchi/rootfs/bin/clover-kachikachi-wr diff --git a/mod/hakchi/rootfs/etc/preinit b/mod/hakchi/rootfs/etc/preinit index 8d2bb64..a045225 100644 --- a/mod/hakchi/rootfs/etc/preinit +++ b/mod/hakchi/rootfs/etc/preinit @@ -53,7 +53,7 @@ script_init(){ } preinit(){ - [ -z "$gamepath" ] && [ -d "/newroot" ] && /bin/busybox --install -s /bin/ && cp -a $rootfs/bin/rsync /bin/ + [ -z "$gamepath" ] && [ -d "/newroot" ] && /bin/busybox --install -s /bin/ && cp -a "$rootfs/bin/rsync" /bin/ source_base source_parts "$preinitpath/p????_*" } diff --git a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions index 9085c48..2719958 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions +++ b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions @@ -6,7 +6,7 @@ mount_base(){ umount_base(){ sync - umount -r "$mountpoint/var/lib" + umount "$mountpoint/var/lib" umount "$mountpoint/var" } @@ -38,7 +38,7 @@ shutdown(){ sync umount -a -r 2>/dev/null poweroff -f - while :;do :;done + while :;do sleep 1;:;done } early_getty(){ @@ -71,15 +71,16 @@ mount_bind(){ } overmount(){ - l_boot_stock=n + [ "$cfg_boot_stock" == "y" ] && return 1 if [ "$#" == "1" ]; then echo overmounting $1 - mount_bind "$rootfs$1" "$mountpoint$1" + mount_bind "$rootfs$1" "$mountpoint$1" && return 0 fi if [ "$#" == "2" ]; then echo overmounting $1 on $2 - mount_bind "$1" "$mountpoint$2" + mount_bind "$rootfs$1" "$mountpoint$2" && return 0 fi + echo overmounting failed } overmount_games(){ @@ -89,8 +90,7 @@ overmount_games(){ echo menu code: $menu_code if [ "$menu_code" != "000" ]; then if [ -d "$rootfs$gamepath/$menu_code" ]; then - overmount "$rootfs$gamepath/$menu_code" "$gamepath" - return $? + overmount "$gamepath/$menu_code" "$gamepath" && return 0 fi fi overmount "$gamepath" diff --git a/mod/hakchi/rootfs/etc/preinit.d/p0000_config b/mod/hakchi/rootfs/etc/preinit.d/p0000_config index e4faab6..68e938f 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/p0000_config +++ b/mod/hakchi/rootfs/etc/preinit.d/p0000_config @@ -1,6 +1,4 @@ cfg_boot_stock_firmware='n' cfg_boot_stock='n' -cfg_clovercon_option='' cfg_disable_armet='y' cfg_nes_extra_args='--ppu-palette 2' -cfg_savecheck='n' diff --git a/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit b/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit index 5300dc8..c7b9d0f 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit +++ b/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit @@ -1,2 +1 @@ echo loading $modname -local l_boot_stock=y diff --git a/mod/hakchi/rootfs/etc/preinit.d/p7100_preinit b/mod/hakchi/rootfs/etc/preinit.d/p7100_preinit index 0e7456f..7110dfb 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/p7100_preinit +++ b/mod/hakchi/rootfs/etc/preinit.d/p7100_preinit @@ -1,6 +1,2 @@ -overmount_base(){ - overmount "/bin" - overmount "/etc" -} - -[ "$cfg_boot_stock" == "y" ] || overmount_base +overmount "/bin" +overmount "/etc" diff --git a/mod/hakchi/rootfs/etc/preinit.d/pa100_games b/mod/hakchi/rootfs/etc/preinit.d/pa100_games index 6df5a26..d0df244 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/pa100_games +++ b/mod/hakchi/rootfs/etc/preinit.d/pa100_games @@ -1 +1 @@ -[ "$cfg_boot_stock" == "y" ] || overmount_games +overmount_games diff --git a/mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock b/mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock index 1159c9b..8385cfb 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock +++ b/mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock @@ -1 +1 @@ -[ "$l_boot_stock" == "y" ] && umount_base +[ "$cfg_boot_stock" == "y" ] && umount_base diff --git a/mod/hakchi/rootfs/etc/preinit.d/pffff_config b/mod/hakchi/rootfs/etc/preinit.d/pffff_config index d1e50f5..9defb13 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/pffff_config +++ b/mod/hakchi/rootfs/etc/preinit.d/pffff_config @@ -1,3 +1,3 @@ -config=p0000_config +local config=p0000_config set | grep -F cfg_ | sort > "$temppath/$config" copy "$temppath/$config" "$preinitpath/$config" diff --git a/mod/hakchi/script/base b/mod/hakchi/script/base index 034c4f7..b7ce429 100644 --- a/mod/hakchi/script/base +++ b/mod/hakchi/script/base @@ -5,6 +5,7 @@ mount_base(){ } umount_base(){ + sync umount "$mountpoint/var/lib" umount "$mountpoint/var" } diff --git a/mod/hakchi/script/transfer b/mod/hakchi/script/transfer index f27b217..8b13380 100644 --- a/mod/hakchi/script/transfer +++ b/mod/hakchi/script/transfer @@ -30,11 +30,10 @@ if [ -d "$transferpath/firmware" ]; then fi # if we're running modified firmware, mount it now -source_parts "$preinitpath/p????_*firmware*" source_parts "$modpath/rootfs/etc/preinit.d/p????_*firmware*" # now we can do install/repair -if [ -d "$preinitpath" ]; then +if [ -f "$preinit" ]; then echo $modname already installed mod_repair else |