Răsfoiți Sursa

Addon.d V3

For seamless /product,/system_ext backup and restore

This reverts commit 416faab8e9460fcf2a91a6a7d716c148e45ccb87.
Alessandro Astone 4 ani în urmă
părinte
comite
55071e36c7
2 a modificat fișierele cu 5 adăugiri și 10 ștergeri
  1. 1 1
      addond_head
  2. 4 9
      addond_tail

+ 1 - 1
addond_head

@@ -1,6 +1,6 @@
 #!/sbin/sh
 #
-# ADDOND_VERSION=2
+# ADDOND_VERSION=3
 #
 # /system/addon.d/30-gapps.sh
 #

+ 4 - 9
addond_tail

@@ -24,16 +24,11 @@ case "$1" in
     # Stub
   ;;
   post-restore)
-    if [ -d "/postinstall" ]; then
-      P="/postinstall/system"
-    else
-      P="/system"
-    fi
-
     for i in $(list_files); do
-      chown root:root "$P/$i"
-      chmod 644 "$P/$i"
-      chmod 755 "$(dirname "$P/$i")"
+      f=$(get_output_path "$S/$i")
+      chown root:root $f
+      chmod 644 $f
+      chmod 755 $(dirname $f)
     done
   ;;
 esac