Gabriele M | 5b33c6c | 2017-01-22 22:50:02 +0100 | [diff] [blame] | 1 | #!/sbin/sh |
Dan Pasanen | 524fe03 | 2018-01-26 10:26:47 -0600 | [diff] [blame] | 2 | # |
| 3 | # ADDOND_VERSION=2 |
| 4 | # |
Gabriele M | 5b33c6c | 2017-01-22 22:50:02 +0100 | [diff] [blame] | 5 | |
| 6 | . /tmp/backuptool.functions |
| 7 | |
| 8 | list_files() { |
| 9 | cat <<EOF |
| 10 | bin/su |
| 11 | etc/init/superuser.rc |
| 12 | xbin/su |
| 13 | EOF |
| 14 | } |
| 15 | |
| 16 | case "$1" in |
| 17 | backup) |
| 18 | list_files | while read FILE DUMMY; do |
| 19 | backup_file $S/"$FILE" |
| 20 | done |
| 21 | ;; |
| 22 | restore) |
| 23 | list_files | while read FILE REPLACEMENT; do |
| 24 | R="" |
| 25 | [ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT" |
| 26 | restore_file $S/"$FILE" "$R" |
| 27 | done |
| 28 | ;; |
| 29 | pre-backup) |
| 30 | # Stub |
| 31 | ;; |
| 32 | post-backup) |
| 33 | # Stub |
| 34 | ;; |
| 35 | pre-restore) |
| 36 | # Stub |
| 37 | ;; |
| 38 | post-restore) |
| 39 | # Stub |
| 40 | ;; |
| 41 | esac |