[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#885453: live-boot: Please strip double slashes from path



Source: live-boot
Version: 1:20170623
Severity: normal
Tags: patch

Hi,

please strip double slashes from path. You already provide and partially
use the trim_path function. Patch is attached.

-- 
Benjamin Drung
System Developer
Debian & Ubuntu Developer

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin

Email: benjamin.drung@profitbricks.com
URL: https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg
>From 84d2835d2797cc850328bc50994b9da381609e39 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <benjamin.drung@profitbricks.com>
Date: Fri, 22 Dec 2017 19:03:58 +0100
Subject: [PATCH] Strip double slashes from path

---
 components/9990-overlay.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/components/9990-overlay.sh b/components/9990-overlay.sh
index d1b9cef..8fd0cfd 100755
--- a/components/9990-overlay.sh
+++ b/components/9990-overlay.sh
@@ -110,7 +110,7 @@ setup_unionfs ()
 						;;
 				esac
 
-				mpoint="${croot}/${imagename}"
+				mpoint=$(trim_path "${croot}/${imagename}")
 				rootfslist="${mpoint} ${rootfslist}"
 
 				mkdir -p "${mpoint}"
@@ -288,9 +288,9 @@ setup_unionfs ()
 	fi
 
 	for dir in ${cow_dirs}; do
-		unionmountpoint="${rootmnt}${dir}"
+		unionmountpoint=$(trim_path "${rootmnt}${dir}")
 		mkdir -p ${unionmountpoint}
-		cow_dir="/live/overlay${dir}"
+		cow_dir=$(trim_path "/live/overlay${dir}")
 		rootfs_dir="${rootfs}${dir}"
 		mkdir -p ${cow_dir}
 		if [ -n "${PERSISTENCE_READONLY}" ] && [ "${cowdevice}" != "tmpfs" ]
-- 
2.14.1


Reply to: