一套客户/服务器模式的备份系统代码,跨平台,支持linux,AIX, IRIX, FreeBSD,
Digital Unix (OSF1), Solaris and HP-UX.
源代码在线查看: afbackup.postinst
#!/bin/sh -e fix_cruft () { DOC=/usr/share/doc/afbackup test -d $DOC && rm -rf $DOC && ln -s afbackup-common $DOC case "$1" in 2.6*) echo "Moving state files to new location!" mv -f /var/log/afbackup/tapepos /var/lib/afbackup > /dev/null 2>&1 ;; esac } inetd () { update-inetd --group OTHER --add \ "afbackup stream tcp nowait root /usr/sbin/afserver afserver /etc/afbackup/server.conf" } cryptkey () { FILE=/etc/afbackup/cryptkey if [ -f $FILE ]; then FILE=$FILE.dpkg-dist fi dd if=/dev/urandom of=$FILE bs=21 count=1 2> /dev/null chmod 600 $FILE } case "$1" in configure) fix_cruft $2 inetd cryptkey ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 0 ;; esac #DEBHELPER#