Changeset 3040


Ignore:
Timestamp:
Oct 6, 2012, 5:25:43 AM (7 years ago)
Author:
bruno
Message:
  • Fix #622: Adds swaplabel support if it exists
Location:
branches/3.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/deplist.d/fs.conf

    r3008 r3040  
    55/sbin/mkfs
    66/sbin/mkswap
     7/sbin/swaplabel
    78/sbin/mke2fs
    89/sbin/mkfs.ext2
  • branches/3.0/mondo/src/restore-scripts/mondo/label-partitions-as-necessary

    r3008 r3040  
    4242            if [ "$opttun" = "-U" ]; then
    4343                LogIt "Creating uuid $label on swap partition $mountpt"
    44                 echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036
     44                if [ -x "/sbin/swaplabel" ]; then
     45                    /sbin/swaplabel $opttun $label $mountpt
     46                else
     47                    echo -n "$label" | perl -ne 's/-//g;chomp;print pack "H*",$_' | dd conv=notrunc "of=$mountpt" obs=1 seek=1036
     48                fi
    4549            else
    46                 command="mkswap $opttun $label $mountpt"
     50                if [ -x "/sbin/swaplabel" ]; then
     51                    command="/sbin/swaplabel $opttun $label $mountpt"
     52                else
     53                    command="mkswap $opttun $label $mountpt"
     54                fi
    4755                LogIt "Running $command"
    4856                $command
Note: See TracChangeset for help on using the changeset viewer.