diff options
author | madmonkey <madfkingmonkey@gmail.com> | 2017-02-15 03:58:28 +0300 |
---|---|---|
committer | madmonkey <madfkingmonkey@gmail.com> | 2017-02-15 03:58:28 +0300 |
commit | f9d2d089f72eb498d1073fd2b2054e502b398d3d (patch) | |
tree | 956ea5e51e39cdf9f2b3b2e598f33b4017cd35a3 | |
parent | a0212c8736ca75a374a088dcbb4c9443b6429366 (diff) |
up
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/b0010_functions | 22 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/p7000_preinit | 1 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/p7070_firmware | 1 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/p7070_preinit | 3 | ||||
-rw-r--r-- | mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock | 1 | ||||
-rw-r--r-- | mod/hakchi/script/package | 9 |
6 files changed, 28 insertions, 9 deletions
diff --git a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions index 2e96d9d..0fc06c6 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/b0010_functions +++ b/mod/hakchi/rootfs/etc/preinit.d/b0010_functions @@ -1,3 +1,14 @@ +mount_base(){ + mount -t tmpfs -o mode=0755,nosuid,nodev tmpfs "$mountpoint/var" + mkdir -p "$mountpoint/var/lib" + mount -o defaults,nosuid,nodev,noatime /dev/nandc "$mountpoint/var/lib" +} + +umount_base(){ + umount "$mountpoint/var/lib" + umount "$mountpoint/var" +} + remount_root(){ local tmpmount=$modpath/var.tmp mkdir -p "$tmpmount" @@ -52,6 +63,7 @@ mount_bind(){ } overmount(){ + l_boot_stock=n if [ "$#" == "1" ]; then echo overmounting $1 mount_bind "$rootfs$1" "$mountpoint$1" @@ -67,9 +79,11 @@ overmount_games(){ [ -f "$installpath/menu" ] && menu_code=$(cat "$installpath/menu") [ -z "$menu_code" ] && menu_code=000 echo menu code: $menu_code - if [ "$menu_code" == "000" ]; then - overmount "$gamepath" - else - overmount "$rootfs$gamepath/$menu_code" "$gamepath" + if [ "$menu_code" != "000" ]; then + if [ -d "$rootfs$gamepath/$menu_code" ]; then + overmount "$rootfs$gamepath/$menu_code" "$gamepath" + return $? + fi fi + overmount "$gamepath" } diff --git a/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit b/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit index c7b9d0f..5300dc8 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit +++ b/mod/hakchi/rootfs/etc/preinit.d/p7000_preinit @@ -1 +1,2 @@ echo loading $modname +local l_boot_stock=y diff --git a/mod/hakchi/rootfs/etc/preinit.d/p7070_firmware b/mod/hakchi/rootfs/etc/preinit.d/p7070_firmware new file mode 100644 index 0000000..f56ae92 --- /dev/null +++ b/mod/hakchi/rootfs/etc/preinit.d/p7070_firmware @@ -0,0 +1 @@ +[ "cfg_boot_stock_firmware" == "y" ] || load_firmware diff --git a/mod/hakchi/rootfs/etc/preinit.d/p7070_preinit b/mod/hakchi/rootfs/etc/preinit.d/p7070_preinit index f56ae92..a65e223 100644 --- a/mod/hakchi/rootfs/etc/preinit.d/p7070_preinit +++ b/mod/hakchi/rootfs/etc/preinit.d/p7070_preinit @@ -1 +1,2 @@ -[ "cfg_boot_stock_firmware" == "y" ] || load_firmware +# placeholder +# rm -f "$preinitpath/p7070_preinit" diff --git a/mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock b/mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock new file mode 100644 index 0000000..1159c9b --- /dev/null +++ b/mod/hakchi/rootfs/etc/preinit.d/pffff_bootstock @@ -0,0 +1 @@ +[ "$l_boot_stock" == "y" ] && umount_base diff --git a/mod/hakchi/script/package b/mod/hakchi/script/package index e7e2997..5a7dde4 100644 --- a/mod/hakchi/script/package +++ b/mod/hakchi/script/package @@ -17,11 +17,12 @@ transfer_default(){ --exclude "/transfer" \ --exclude "/uninstall" \ --exclude "*.hmod" \ - "$transferpath/" "$installpath/" + "$transferpath/" "$rootfs/" } transfer_path(){ local transferpath=$1 + chown -R 0:0 "$transferpath/" find "$transferpath/" -maxdepth 1 -type f -iname "readme.*" -delete find "$transferpath/" -maxdepth 1 -type f -iname "*.txt" -delete find "$transferpath/" -maxdepth 1 -type f -iname "*.md" -delete @@ -50,9 +51,9 @@ pack_install(){ if [ ! -f "$transferpath/uninstall" ]; then echo creating uninstall for $(basename "$1" .hmod)... cd "$transferpath" - find . -type l -exec echo rm -f \"\$installpath/{}\" + >> "$transferpath/uninstall" - find . -type f -exec echo rm -f \"\$installpath/{}\" + >> "$transferpath/uninstall" - find . -depth -mindepth 1 -type d -exec echo rmdir \"\$installpath/{}\" + >> "$transferpath/uninstall" + find . -type l -exec echo rm -f \"\$rootfs/{}\" + >> "$transferpath/uninstall" + find . -type f -exec echo rm -f \"\$rootfs/{}\" + >> "$transferpath/uninstall" + find . -depth -mindepth 1 -type d -exec echo rmdir \"\$rootfs/{}\" + >> "$transferpath/uninstall" [ $(stat -c%s "$transferpath/uninstall") -gt 8 ] || rm -f "$transferpath/uninstall" fi cd / |