Changeset 3437 in MondoRescue
- Timestamp:
- Aug 28, 2015, 4:08:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/restore-scripts/mondo/label-partitions-as-necessary
r3330 r3437 58 58 elif [ "$format" = "swap" ] ; then 59 59 if [ "$opttun" = "-U" ]; then 60 LogIt "Creating uuid $label on swap partition $mountpt" 61 if [ -x "/sbin/swaplabel" ]; then 62 /sbin/swaplabel $opttun $label $mountpt 60 typelabel="UUID" 61 else 62 typelabel="Label" 63 fi 64 if [ -x "/sbin/swaplabel" ]; then 65 # Better choice 66 command="/sbin/swaplabel $opttun $label $mountpt" 67 else 68 if [ "$opttun" = "-U" ]; then 69 LogIt "Really running dd conv=notrunc of=$mountpt obs=1 seek=1036" 70 echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036 71 command=/bin/true 63 72 else 64 echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=103673 command="mkswap -f $opttun $label $mountpt" 65 74 fi 66 else67 if [ -x "/sbin/swaplabel" ]; then68 command="/sbin/swaplabel $opttun $label $mountpt"69 else70 command="mkswap $opttun $label $mountpt"71 fi72 LogIt "Running $command"73 $command74 75 fi 76 LogIt "Creating $typelabel $label on swap partition $mountpt" 77 LogIt "Running $command" 78 $command 75 79 else 76 80 LogIt "I am NOT going to run tune2|4fs/reiserfstune: the partition is format '$format', which doesn't like tune2|4fs/reiserfstune anyway"
Note:
See TracChangeset
for help on using the changeset viewer.