bug#22387: Non-interactive use and errors
"Brian C. Lane" <[email protected]>
| Newsgroups | gmane.comp.gnu.parted.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jan 16, 2016 at 08:11:26PM +0100, Narcis Garcia wrote: > Hello, I'm trying to call parted from a ShellScript to get details from > block devices: > > $ parted /dev/OneDevice print > > But when I specify a removable device, it expects user interaction: > Error: Error opening /dev/OneDevice: No medium found > Retry/Cancel? > > Is there any way to avoid this and get only the error message and status? Use script mode: parted -s /dev/blah print Any user interaction will take the 'safe' choice, not changing any data. -- Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)