better compatibility with ubuntu

pull/5/head
Tomas M 2013-01-08 06:43:22 -09:00
parent 54e54e7b1a
commit 4e2f904136
1 changed files with 3 additions and 1 deletions

View File

@ -37,7 +37,9 @@ if [ "$DEV" != "$PART" ]; then
(
fdisk -l "$DEV" | fgrep "*" | fgrep "$DEV" | cut -d " " -f 1 \
| sed -r "s:.*[^0-9]::" | xargs -I '{}' echo -ne "a\n{}\n"
echo -ne "a\n$PART\nw\n"
echo a
echo $PART
echo w
) | fdisk $DEV >/dev/null 2>&1
fi