From ef7098cce0c3e9c5d386028ac9f7de066d01b6c3 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 24 Aug 2016 13:08:50 +0200 Subject: mount-nv: always trim spaces in the FLASH_SW variable When mk-flash-layout is called from mtd-part, it may emit "-t jffs2" after the partition name. We need to trim this. --- scripts/mount-nv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/mount-nv b/scripts/mount-nv index 753ee49..15a7960 100755 --- a/scripts/mount-nv +++ b/scripts/mount-nv @@ -26,6 +26,9 @@ find_flash() { fi fi + # " -t jffs2" may appear in the FLASH_SW variable for MTD devices + FLASH_SW="${FLASH_SW%% *}" + if [ -z "$FLASH_SW" ]; then flash="$(cat /proc/cmdline)" if [ -n "${flash##*flash=*}" ]; then -- 1.7.12.1