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