Changeset 3740 in MondoRescue for branches/3.3/mindi/mindi


Ignore:
Timestamp:
Nov 18, 2019, 2:41:32 AM (4 years ago)
Author:
Bruno Cornec
Message:

Avoid recursing for btrfs subvol creating as already using option -p for mkdir

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi/mindi

    r3738 r3740  
    14801480        # If the intermediate dirs of subvol are not a subvolume, we need to create them as dir
    14811481        parent=`dirname $subvol`
    1482         while [ $parent != "/" ]; do
    1483             grep -qE "$sep$parent$" $MINDI_TMP/btrfssubvol.txt
    1484             if [ $? -ne 0 ];
    1485                 echo "mkdir -p /mnt/RESTORING/$sep$parent" >> $MINDI_TMP/create-btrfs-subvol
    1486             fi
    1487             parent=`dirname $parent`
    1488         done
     1482        grep -qE "$sep$parent$" $MINDI_TMP/btrfssubvol.txt
     1483        if [ $? -ne 0 ]; then
     1484            echo "mkdir -p /mnt/RESTORING/$sep$parent" >> $MINDI_TMP/create-btrfs-subvol
     1485        fi
    14891486        echo "btrfs subvolume create $mountpoint" >> $MINDI_TMP/create-btrfs-subvol
    14901487        echo "mount -t btrfs -o subvol=$sep$subvol $device $mountpoint" >> $MINDI_TMP/mount-btrfs-subvol
Note: See TracChangeset for help on using the changeset viewer.