Skip to content
Permalink
Browse files

Detect rootdev/part oon rootfs systems like SOPine

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 29, 2019
1 parent 6aa5c3d commit 8516ef23070fcef3a85dacefeb53652491e4bb28
Showing with 7 additions and 2 deletions.
  1. +3 −0 info.sh
  2. +4 −2 info2.sh
@@ -101,6 +101,9 @@ elif [[ $COMMAND == "speedtest" ]]; then
# output json response of detected wifi networks
/usr/local/share/nems/nems-scripts/info2.sh 10 $VARIABLE

elif [[ $COMMAND == "rootfulldev" ]]; then
/bin/mount | /bin/sed -n 's|^/dev/\(.*\) on / .*|\1|p'

elif [[ $COMMAND == "rootdev" ]]; then
# output json response of detected wifi networks
/usr/local/share/nems/nems-scripts/info2.sh 8
@@ -105,7 +105,8 @@ switch($argv[1]) {
break;
case 8: // root device
$fulldev=shell_exec("df /root | awk '/^\/dev/ {print $1}'");
// $fulldev=shell_exec("df /root | awk '/^\/dev/ {print $1}'");
$fulldev=trim(shell_exec("/usr/local/bin/nems-info rootfulldev"));
$tmp = explode('p',$fulldev);
if (is_array($tmp)) {
end($tmp);
@@ -122,7 +123,8 @@ switch($argv[1]) {
break;
case 9: // root partition on root device
$fulldev=shell_exec("df /root | awk '/^\/dev/ {print $1}'");
// $fulldev=shell_exec("df /root | awk '/^\/dev/ {print $1}'");
$fulldev=trim(shell_exec("/usr/local/bin/nems-info rootfulldev"));
$tmp = explode('p',$fulldev);
if (is_array($tmp)) {
end($tmp);

0 comments on commit 8516ef2

Please sign in to comment.
You can’t perform that action at this time.