GNU bug report logs - #42495
Option not working in scripting mode.

Previous Next

Package: parted;

Reported by: Sachiel2008 <Sachiel2008 <at> protonmail.com>

Date: Thu, 23 Jul 2020 19:05:01 UTC

Severity: normal

Done: "Brian C. Lane" <bcl <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Brian C. Lane" <bcl <at> redhat.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#42495: closed (Option not working in scripting mode.)
Date: Thu, 23 Jul 2020 22:53:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Thu, 23 Jul 2020 15:52:17 -0700
with message-id <20200723225217.GD88912 <at> ohop.brianlane.com>
and subject line Re: bug#42495: Option not working in scripting mode.
has caused the debbugs.gnu.org bug report #42495,
regarding Option not working in scripting mode.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
42495: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42495
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sachiel2008 <Sachiel2008 <at> protonmail.com>
To: "bug-parted <at> gnu.org" <bug-parted <at> gnu.org>
Subject: Re: Option not working in scripting mode.
Date: Thu, 23 Jul 2020 18:14:35 +0000
[Message part 3 (text/plain, inline)]
Seems like I accidentally deleted the last sentence. When I try the second chunk of commands, I get a invalid option error.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, July 23, 2020 6:13 PM, Sachiel2008 <Sachiel2008 <at> protonmail.com> wrote:

> Dear GNU
>
> I found the following command op the internet:
>
>> root <at> localhost # parted -a optimal /dev/sda
>> (parted) unit mib
>> (parted) mkpart primary 515 -1
>
> However, when I try to turn it into a part of a script like this:
>
>> root <at> localhost # parted --script /dev/sda mkpart primary 515 -1
>
> Greetings, Sachiel2008
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: "Brian C. Lane" <bcl <at> redhat.com>
To: 42495-close <at> debbugs.gnu.org
Subject: Re: bug#42495: Option not working in scripting mode.
Date: Thu, 23 Jul 2020 15:52:17 -0700
On Thu, Jul 23, 2020 at 06:14:35PM +0000, Sachiel2008 via Bug reports for the GNU Parted disk partition editor wrote:
> Seems like I accidentally deleted the last sentence. When I try the second chunk of commands, I get a invalid option error.
> 
> Sent with [ProtonMail](https://protonmail.com) Secure Email.
> 
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, July 23, 2020 6:13 PM, Sachiel2008 <Sachiel2008 <at> protonmail.com> wrote:
> 
> > Dear GNU
> >
> > I found the following command op the internet:
> >
> >> root <at> localhost # parted -a optimal /dev/sda
> >> (parted) unit mib
> >> (parted) mkpart primary 515 -1
> >
> > However, when I try to turn it into a part of a script like this:
> >
> >> root <at> localhost # parted --script /dev/sda mkpart primary 515 -1

You need to pass -- so that the argument parser won't try to turn -1
into an option:

 parted --script -- /dev/sda mkpart primary 515 -1

Brian

-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart



This bug report was last modified 4 years and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.