[elbe-devel] [PATCH] fstab: allow to pass more than one argument to tune2fs command

Andrey Skvortsov andrej.skvortzov at gmail.com
Wed Sep 11 23:16:50 CEST 2019


For example,
<tune2fs>-i 0 -O ^metadata_csum,^64bit</tune2fs>

Quotes around tune2fs arguments break arguments parsing.

$ tune2fs "-i 0 -O ^metadata_csum,^64bit" /dev/sdd2
tune2fs 1.44.5 (15-Dec-2018)
tune2fs: bad interval -  0 -O ^metadata_csum,^64bit

$ tune2fs "-O ^metadata_csum,^64bit -i 0" /dev/sdd2
tune2fs 1.44.5 (15-Dec-2018)
Invalid filesystem option set:  ^metadata_csum,^64bit -i 0

Signed-off-by: Andrey Skvortsov <andrej.skvortzov at gmail.com>
---
 elbepack/fstab.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/fstab.py b/elbepack/fstab.py
index 8c938e4f7..94f11d2f5 100644
--- a/elbepack/fstab.py
+++ b/elbepack/fstab.py
@@ -146,4 +146,4 @@ class fstabentry(object):
 
     def tuning(self, loopdev):
         if self.tune:
-            do('tune2fs "%s" %s' % (self.tune, loopdev))
+            do('tune2fs %s %s' % (self.tune, loopdev))
-- 
2.20.1




More information about the elbe-devel mailing list