On Friday 30 May 2008, Max Vozeler wrote: > > part_of_sataraid () { > > local raiddev > > for raiddev in $(dmraid -r -c); do > > @@ -52,8 +61,7 @@ if [ ! -f /var/run/parted_server.pid ]; then > > > > IFS="$NL" > > for partdev in $(parted_devices | > > - grep -v '^/dev/md' | > > - sed 's,^/dev/\(ide\|scsi\|[hs]d\),!/dev/\1,' | > > + sed 's,^/dev/\(ide\|scsi\|[hsm]d\),!/dev/\1,' | > > Could be renamed to part_of_raid() or something after the change? No. You seem to be suggesting something based on the reading of two unrelated hunks in the diff, not the actual code. > > + # create a label > > + open_dialog NEW_LABEL loop > > + close_dialog > > + # find the free space > > + open_dialog PARTITIONS > > + free_space='' > > + while { read_line num id size type fs path name; [ "$id" ]; }; do > > + if [ "$fs" = free ]; then > > + free_space=$id > > + free_size=$size > > + fi > > + done > > + close_dialog > > + # create partition in the free space > > + if [ "$free_space" ]; then > > + open_dialog NEW_PARTITION primary ext2 $free_space full > > $free_size + read_line num id size type fs path name > > + close_dialog > > + if [ "$id" ]; then > > + open_dialog GET_FILE_SYSTEM $id > > + read_line filesystem > > + close_dialog > > + if [ "$filesystem" != none ]; then > > + open_dialog CHANGE_FILE_SYSTEM $id $filesystem > > + close_dialog > > + fi > > + fi > > + fi > > + open_dialog DISK_UNCHANGED > > + close_dialog > > Another thought unrelated to your changes: > > This code exists in -crypto, -md, -lvm and with a few > differences also in partman-auto-lvm. Perhaps we should > turn this into a function in -base/lib/. partman-partitioning/lib seems more appropriate as it is somewhat related to what we have in disk-label.sh there.
Attachment:
signature.asc
Description: This is a digitally signed message part.