55071e36c7
For seamless /product,/system_ext backup and restore This reverts commit 416faab8e9460fcf2a91a6a7d716c148e45ccb87.
35 lines
572 B
Plaintext
35 lines
572 B
Plaintext
EOF
|
|
}
|
|
|
|
case "$1" in
|
|
backup)
|
|
list_files | while read FILE DUMMY; do
|
|
backup_file $S/$FILE
|
|
done
|
|
;;
|
|
restore)
|
|
list_files | while read FILE REPLACEMENT; do
|
|
R=""
|
|
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
|
|
[ -f "$C/$S/$FILE" ] && restore_file $S/$FILE $R
|
|
done
|
|
;;
|
|
pre-backup)
|
|
# Stub
|
|
;;
|
|
post-backup)
|
|
# Stub
|
|
;;
|
|
pre-restore)
|
|
# Stub
|
|
;;
|
|
post-restore)
|
|
for i in $(list_files); do
|
|
f=$(get_output_path "$S/$i")
|
|
chown root:root $f
|
|
chmod 644 $f
|
|
chmod 755 $(dirname $f)
|
|
done
|
|
;;
|
|
esac
|