Remove \n from the end of fs_path in ONIEUpdater (#12465)
This fixes the following error ``` admin@sonic:~$ sudo fwutil show status mount: /mnt/onie-fs: special device /dev/sda2 does not exist. Error: Command '['mount', '-n', '-r', '-t', 'ext4', '/dev/sda2\n', '/mnt/onie-fs']' returned non-zero exit status 32.. Aborting... Aborted! admin@sonic:~$ sudo vi /usr/local/lib/python3.9/dist-packages/sonic_platform/ ``` Seems like #11877 the rstrip('\n') was removed. Probably by mistake. Signed-off-by: Stephen Sun <stephens@nvidia.com>
This commit is contained in:
parent
f39c2adc04
commit
8c73e68468
@ -172,7 +172,7 @@ class ONIEUpdater(object):
|
||||
cmd1 = ['fdisk', '-l']
|
||||
cmd2 = ['grep', 'ONIE boot']
|
||||
cmd3 = ['awk', '{print $1}']
|
||||
fs_path = check_output_pipe(cmd1, cmd2, cmd3)
|
||||
fs_path = check_output_pipe(cmd1, cmd2, cmd3).rstrip('\n')
|
||||
|
||||
os.mkdir(fs_mountpoint)
|
||||
cmd = ["mount", "-n", "-r", "-t", "ext4", fs_path, fs_mountpoint]
|
||||
|
Reference in New Issue
Block a user