if multiple mountpoints avail, pick the first one
authorCsillag Tamas <cstamas@digitus.itk.ppke.hu>
Wed, 4 Oct 2023 12:55:22 +0000 (14:55 +0200)
committerGitHub <noreply@github.com>
Wed, 4 Oct 2023 12:55:22 +0000 (14:55 +0200)
autoconfig.functions

index 254129b..228a561 100755 (executable)
@@ -1412,7 +1412,7 @@ else
     else
       eindent
       einfo "debs, config, scripts are read from $DCSDEVICE." ; eend 0
-      DCSDIR="$(< /proc/mounts awk -v DCSDEV=$DCSDEVICE '{if ($1 == DCSDEV) { print $2 }}')"
+      DCSDIR="$(< /proc/mounts awk -v DCSDEV=$DCSDEVICE '{if ($1 == DCSDEV) { print $2; exit }}')"
       if [ -n "$DCSDIR" ]; then
         ewarn "$DCSDEVICE already mounted on $DCSDIR"; eend 0
       else