Comment 1 for bug 1270203

Revision history for this message
Phillip Susi (psusi) wrote :

echo "Yes" | sudo parted ---pretend-input-tty /dev/vdb resizepart 1 1000 fails because of another bug I had noticed recently but not gotten around to fixing yet... when looking for an answer to the exception question, like regular input, parted first looks for the next word given on the command line before trying to read from stdin. It should skip the command line and go straight to stdin for exceptions. You can work around this by not mixing stdin with command line arguments, and just echo everything. In other words:

cat <<EOF | sudo parted ---pretend-input-tty /dev/vdb
resizepart 1 1000
yes
EOF

You can also use whatever units you like; you just need to either change the default unit with the unit command, or append the unit suffix to the numbers, such as 2048s for sector 2048.