[BACK]Return to daily CVS log [TXT][DIR] Up to [local] / src / etc

Diff for /src/etc/daily between version 1.73 and 1.74

version 1.73, 2012/02/08 18:22:43 version 1.74, 2012/02/11 00:37:04
Line 94 
Line 94 
 # use it as a backup root filesystem to be updated daily.  # use it as a backup root filesystem to be updated daily.
 next_part "Backing up root filesystem:"  next_part "Backing up root filesystem:"
 while [ "X$ROOTBACKUP" = X1 ]; do  while [ "X$ROOTBACKUP" = X1 ]; do
         rootbak=`awk '$2 == "/altroot" && $3 == "ffs" && $4 ~ /xx/ \          rootbak=`awk '$1 !~ /^#/ && $2 == "/altroot" && $3 == "ffs" && \
                 { print $1 }' < /etc/fstab`                  $4 ~ /xx/ { print $1 }' < /etc/fstab`
         if [ -z "$rootbak" ]; then          if [ -z "$rootbak" ]; then
                 echo "No xx ffs /altroot device found in the fstab(5)."                  echo "No xx ffs /altroot device found in the fstab(5)."
                 break                  break
Line 104 
Line 104 
         bakdisk=${rootbak%%?(.)[a-p]}          bakdisk=${rootbak%%?(.)[a-p]}
         sysctl -n hw.disknames | grep -Fqw $bakdisk || break          sysctl -n hw.disknames | grep -Fqw $bakdisk || break
         bakpart=${rootbak##$bakdisk?(.)}          bakpart=${rootbak##$bakdisk?(.)}
           OLDIFS=$IFS
           IFS=,
           for d in `sysctl -n hw.disknames`; do
                   # If the provided disk name is a duid, substitute the device.
                   if [ X$bakdisk = X${d#*:} ]; then
                           bakdisk=${d%:*}
                           rootbak=$bakdisk$bakpart
                   fi
           done
           IFS=$OLDIFS
         baksize=`disklabel $bakdisk 2>/dev/null | \          baksize=`disklabel $bakdisk 2>/dev/null | \
                 awk -v "part=$bakpart:" '$1 == part { print $2 }'`                  awk -v "part=$bakpart:" '$1 == part { print $2 }'`
         rootdev=`mount | awk '$3 == "/" && $1 ~ /^\/dev\// && $5 == "ffs" \          rootdev=`mount | awk '$3 == "/" && $1 ~ /^\/dev\// && $5 == "ffs" \

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74