=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/etc/daily,v retrieving revision 1.72 retrieving revision 1.73 diff -c -r1.72 -r1.73 *** src/etc/daily 2011/12/06 21:02:39 1.72 --- src/etc/daily 2012/02/08 18:22:43 1.73 *************** *** 1,5 **** # ! # $OpenBSD: daily,v 1.72 2011/12/06 21:02:39 halex Exp $ # From: @(#)daily 8.2 (Berkeley) 1/25/94 # # For local additions, create the file /etc/daily.local. --- 1,5 ---- # ! # $OpenBSD: daily,v 1.73 2012/02/08 18:22:43 krw Exp $ # From: @(#)daily 8.2 (Berkeley) 1/25/94 # # For local additions, create the file /etc/daily.local. *************** *** 90,109 **** fi # If ROOTBACKUP is set to 1 in the environment, and ! # if filesystem named /altroot is type ffs, on /dev/* and mounted "xx", # use it as a backup root filesystem to be updated daily. next_part "Backing up root filesystem:" while [ "X$ROOTBACKUP" = X1 ]; do ! rootbak=`awk '$2 == "/altroot" && $1 ~ /^\/dev\// && $3 == "ffs" && \ ! $4 ~ /xx/ \ ! { print substr($1, 6) }' < /etc/fstab` if [ -z "$rootbak" ]; then echo "No xx ffs /altroot device found in the fstab(5)." break fi ! bakdisk=${rootbak%[a-p]} sysctl -n hw.disknames | grep -Fqw $bakdisk || break ! bakpart=${rootbak#$bakdisk} baksize=`disklabel $bakdisk 2>/dev/null | \ awk -v "part=$bakpart:" '$1 == part { print $2 }'` rootdev=`mount | awk '$3 == "/" && $1 ~ /^\/dev\// && $5 == "ffs" \ --- 90,109 ---- fi # If ROOTBACKUP is set to 1 in the environment, and ! # if filesystem named /altroot is type ffs and mounted "xx", # use it as a backup root filesystem to be updated daily. next_part "Backing up root filesystem:" while [ "X$ROOTBACKUP" = X1 ]; do ! rootbak=`awk '$2 == "/altroot" && $3 == "ffs" && $4 ~ /xx/ \ ! { print $1 }' < /etc/fstab` if [ -z "$rootbak" ]; then echo "No xx ffs /altroot device found in the fstab(5)." break fi ! rootbak=${rootbak#/dev/} ! bakdisk=${rootbak%%?(.)[a-p]} sysctl -n hw.disknames | grep -Fqw $bakdisk || break ! bakpart=${rootbak##$bakdisk?(.)} baksize=`disklabel $bakdisk 2>/dev/null | \ awk -v "part=$bakpart:" '$1 == part { print $2 }'` rootdev=`mount | awk '$3 == "/" && $1 ~ /^\/dev\// && $5 == "ffs" \