Skip to content

Commit a44a50c

Browse files
SSingh5845andrestraker
authored andcommitted
fixed the issue of not properly switching between network modes
Signed-off-by: Subham Singh <Subham.Singh@analog.com>
1 parent d29864c commit a44a50c

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

Web-UI/Powershell-Scripts/network-change.ps1

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
$baseUrl = "http://192.168.56.1:8000"
44

5+
# check for file system Read-Write Permission
6+
$output = powershell -Command "& { .\permission-ops.ps1 -value 'view' }"
7+
8+
$output = $output -join "`n"
9+
$output = $output.Trim()
10+
11+
if ($output -match "Permission is\s*:\s*(RO|RW)") {
12+
$permission = $matches[1]
13+
if($permission -eq "RO"){
14+
Write-Host "File System Permission is : $permission. Make Sure File System Permission is RW." -ForegroundColor Red
15+
exit 1
16+
}
17+
} else {
18+
Write-Host "Permission not found in output."
19+
exit 1
20+
}
21+
522
# Default value
623
$value = "check"
724

Web-UI/web-1.0.0/network-mode-switch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ fi
1010
VERSION=$1
1111
USER_CHOICE=$2
1212

13-
CONFIG_FILE_1="/usr/share/systemd/usb-gadget.sh"
14-
CONFIG_FILE_3="/usr/share/systemd/"
13+
CONFIG_FILE_1="/home/analog/Workspace/bin/usb-gadget.sh"
14+
CONFIG_FILE_3="/home/analog/Workspace/bin/"
1515
TEMP_FILE="/home/analog/Workspace/requirements/usb-gadget.tmp"
1616
CONFIG_FILE_2="/home/analog/Workspace/requirements/usb-gadget.sh"
1717

0 commit comments

Comments
 (0)