From 394f9e614fcf36b2a22cfbab713a662dbf7b8808 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 31 May 2021 17:54:58 -0700 Subject: strip trailing slashes from mount points in VOLUME fstab entries Signed-off-by: Sean Whitton --- src/property/fstab.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/property/fstab.lisp') diff --git a/src/property/fstab.lisp b/src/property/fstab.lisp index c150968..17749bf 100644 --- a/src/property/fstab.lisp +++ b/src/property/fstab.lisp @@ -37,7 +37,11 @@ Other properties might fill it in." (strcat "PARTUUID=" (get-findmnt-field (mount-point volume) "PARTUUID"))) (defmethod fs-file ((volume filesystem)) - (mount-point volume)) + (let* ((ns (unix-namestring (mount-point volume))) + (length (length ns))) + (if (and (> length 1) (char= #\/ (last-char ns))) + (subseq ns 0 (1- (length ns))) + ns))) (defmethod fs-vfstype ((volume ext4-filesystem)) "ext4") -- cgit v1.2.3