add iptables modules, need to be changed in a generic postinst method
[openwrt.git] / target / default / target_skeleton / sbin / backup
1 #!/bin/sh
2 for param in $*; do
3 case "$param" in
4 *)
5 OUTPUT_FILE="$param"
6 ;;
7 esac
8 done
9
10 if [ "$OUTPUT_FILE" = "-" ]; then
11 echo "Writing backup to stdout.." >&2
12 elif [ "$OUTPUT_FILE" = "" ]; then
13 echo "No output file."
14 exit 1
15 else
16 echo "Writing backup to $OUTPUT_FILE" >&2
17 exec > "$OUTPUT_FILE"
18 fi
19
20 echo __FILELIST__
21 find /etc -type f > /tmp/.wlbackup_files
22 cat /tmp/.wlbackup_files
23
24 echo __IPKG__
25 cat /etc/ipkg.conf
26
27 echo __PACKAGES__
28 grep '^Package:' /usr/lib/ipkg/status | cut -d' ' -f2
29
30 echo __FILES__
31 tar -T /tmp/.wlbackup_files -cz 2>/dev/null
32 rm -f /tmp/.wlbackup_files
This page took 0.041895 seconds and 5 git commands to generate.