Skip to content

sonic_installer list without sudo #927

Open
@qiluo-msft

Description

@qiluo-msft

Description

Nowadays I must use below command

sudo sonic_installer list

Instead of

sonic_installer list

The sudo seems not necessary and this is a read only operation.

Additional information you deem important (e.g. issue happens only occasionally)
I believe we could solve this issue by make grub.cfg accessible to everyone

sudo chmod a+r /host/grub/grub.cfg
admin@sonic:~$ python
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sonic_installer.main import *
>>> images = get_installed_images()
>>> curimage = get_current_image()
>>> nextimage = get_next_image()
>>> images
['SONiC-OS-20181130.70', 'SONiC-OS-20181130.77']
>>> curimage
'SONiC-OS-20181130.77'
>>> nextimage
'SONiC-OS-20181130.70'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions