Avoid double slashes in some paths
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Fri, 22 Dec 2017 18:03:58 +0000 (19:03 +0100)
committerRaphaël Hertzog <hertzog@debian.org>
Fri, 23 Feb 2018 17:09:46 +0000 (18:09 +0100)
Closes: #885453

components/9990-overlay.sh

index d1b9cef..8fd0cfd 100755 (executable)
@@ -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" ]