[PATCH] live-image: ask for sudo permissions instead of exiting
Alex Hung
alex.hung at canonical.com
Thu Jun 18 17:54:15 UTC 2020
On Thu, Jun 18, 2020 at 5:19 AM Colin Ian King <colin.king at canonical.com>
wrote:
> On 18/06/2020 00:43, Alex Hung wrote:
> > Signed-off-by: Alex Hung <alex.hung at canonical.com>
> > ---
> > live-image/fwts-frontend-text | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/live-image/fwts-frontend-text
> b/live-image/fwts-frontend-text
> > index 7fe4533f..4c397438 100755
> > --- a/live-image/fwts-frontend-text
> > +++ b/live-image/fwts-frontend-text
> > @@ -31,7 +31,8 @@ FWTS_TIME=`date +%H%M`
> > #
> > if [ $EUID -ne 0 ]; then
> > echo "`basename $0`: must be executed with sudo"
> > - exit 1
> > + SELF="$(readlink -f "${BASH_SOURCE[0]}")"
> > + exec sudo -- "$BASH" -- "$SELF" "$@"
> > fi
> >
> > #
> >
> How does this work for distros that don't support sudo?
>
A good point. Let's drop this patch.
>
> Colin
>
--
Cheers,
Alex Hung
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20200618/7dee8c61/attachment.html>
More information about the fwts-devel
mailing list