Skip to content

Possible error while trying to exit the script from uninstallation #72

@TheJags

Description

@TheJags

I have just installed the script in a virtual machine with Ubuntu 21.10 Impish. There's only one kernel, v5.13.0-051300 (image-unsigned, headers, and modules), installed on the system.

Note: I have renamed the script to umk.sh and have created an alias alias umkun='sudo /usr/local/scripts/umk.sh -u'

While trying sudo umk.sh -u or "umkun" in my case with alias, I noticed that, from:

Which kernel version do you wish to uninstall? prompt,

un-installation will proceed to next step upon entering (almost anything): n or 1 or q or w.

Only if I press ESC the script will exit with error message.

Though script does exit, upon entering n after getting Are you sure you wish to remove kernel version v5.13.0-051300? (y/N) message.

I don't know whether this behavior could be modified to something like: type the number between [] OR press q to exit: or not... just thought to raise the issue in here.

Thank you so much for the script :)

Detailed messages:

This first one is when I pressed ESC

admn@impish:~$ umkun

Which kernel version do you wish to uninstall?
[0]: v5.13.0-051300
type the number between []: ^[
/usr/local/scripts/umk.sh: line 784:  syntax error: operand expected (error token is "


admn@impish:~$ umkun

Which kernel version do you wish to uninstall?
[0]: v5.13.0-051300
type the number between []: n
Are you sure you wish to remove kernel version v5.13.0-051300? (y/N)

admn@impish:~$ umkun

Which kernel version do you wish to uninstall?
[0]: v5.13.0-051300
type the number between []: 1
Are you sure you wish to remove kernel version ? (y/N)
admn@impish:~$ umkun

Which kernel version do you wish to uninstall?
[0]: v5.13.0-051300
type the number between []: q
Are you sure you wish to remove kernel version v5.13.0-051300? (y/N)

admn@impish:~$ umkun

Which kernel version do you wish to uninstall?
[0]: v5.13.0-051300
type the number between []: w
Are you sure you wish to remove kernel version v5.13.0-051300? (y/N)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions