123456789101112131415161718192021222324252627282930313233343536373839 |
- 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)
- 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")"
- done
- ;;
- esac
|