Changeset 3702 in MondoRescue for branches/3.3/mindi/mindi
- Timestamp:
- Apr 11, 2018, 2:05:18 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi/mindi
r3697 r3702 829 829 830 830 ListAllPartitions() { 831 grep -Evx " *#.*| *none.*" $MY_FSTAB | $AWK '/^\/dev\/[imhs]d||^LABEL=\/|^UUID=/ && !/\/fdd|\/cdr|\/zip|\/floppy/ {print $1}' 831 grep -Evx " *#.*| *none.*" $MY_FSTAB | $AWK '/^\/dev\/[imhs]d||^LABEL=\/|^UUID=/ && !/\/fdd|\/cdr|\/zip|\/floppy/ {print $1}' | sort -u 832 832 [ -e "/etc/raidtab" ] && $AWK '/^ *device/ {print $2}' /etc/raidtab 833 833 if [ -e "/vmfs/volumes" ]; then … … 1073 1073 useless_dev="/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1 tmpfs devpts sysfs proc debugfs" 1074 1074 for c_p in $all_partitions ; do 1075 # Skip fd/cd devices, network FS, cifs 1075 # Skip fd/cd devices, network FS, cifs, brtfs subvols 1076 1076 [ "`echo "$useless_dev" | grep -F "$c_p"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | grep -E "^//"`" != "" ]&& continue 1077 1077 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue … … 1089 1089 fi 1090 1090 [ "$c_p" = "none" ] && continue 1091 1091 1092 redhat_label="" 1092 1093 label="" … … 1253 1254 fi 1254 1255 1256 # Avoid analyzing btrfs subvol partitions 1257 partition_option=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$str_to_find_fmt_with" | grep -vx " *#.*" | $AWK '{print $4}' | grep -v 'subvol=' | head -n1` 1255 1258 # Detects noauto partitions not mounted and exclude them 1256 partition_option=`tr -s '\t' ' ' < $MY_FSTAB | grep -w "$str_to_find_fmt_with" | grep -vx " *#.*" | $AWK '{print $4}' | head -n1`1257 1259 if [ "`echo "$partition_option" | grep -i noauto`" != "" ] && [ "`mount | grep -w "$partition_mountpt"`" = "" ] ; then 1258 1260 LogFile "INFO: Excluding $current_partition from mountlist (due to noauto option in fstab)" 1259 1261 continue 1260 1262 fi 1261 1263 # Detects bind partitions and exclude them 1262 1264 if [ "`echo "$partition_option" | grep -iw bind`" != "" ]; then 1263 1265 LogFile "INFO: Excluding $current_partition from mountlist (due to bind option in fstab)" 1264 1266 continue 1265 1267 fi … … 1292 1294 fi 1293 1295 1294 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB` 1296 # sort in case of btrfs subvol 1297 partition_format=`$AWK '$1 == "'"$str_to_find_fmt_with"'" {print $3}' $MY_FSTAB | sort -u` 1295 1298 # Detects iso9660 ISO images and exclude them 1296 1299 if [ "`echo "$partition_format" | grep -iw iso9660`" != "" ]; then
Note:
See TracChangeset
for help on using the changeset viewer.