mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
upload2usb.php add 'grep media' to device filter
This commit is contained in:
parent
bd8c131ef6
commit
ebceb4a6ac
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ function getTargetUSBDriveLocation () {
|
|||
// lsblk --output NAME,TRAN,RM,MOUNTPOINT --pairs |grep RM=\"1\" | grep -v MOUNTPOINT=\"\" | cut -d " " -f 4 | cut -d "=" -f 2
|
||||
|
||||
# error if 1<>usb sticks are installed
|
||||
$rmv_usb_path_count = shell_exec('lsblk --output NAME,TRAN,RM,MOUNTPOINT --pairs |grep RM=\"1\" | grep -v MOUNTPOINT=\"\" | cut -d " " -f 4 | wc -l');
|
||||
$rmv_usb_path_count = shell_exec('lsblk --output NAME,TRAN,RM,MOUNTPOINT --pairs |grep RM=\"1\" | grep -v MOUNTPOINT=\"\" | cut -d " " -f 4 | grep media | wc -l');
|
||||
if ($rmv_usb_path_count == 0) {
|
||||
throw new RuntimeException('0 USB sticks found. <br/><br/>');
|
||||
} elseif ($rmv_usb_path_count > 1) {
|
||||
|
|
Loading…
Reference in a new issue