Skip to contentSkip to conversation

generic/077: fall back to /usr if /lib/modules doesn't exist

PATCH In review Theodore Ts'o 2 participants 2 messages Aug 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/077: fall back to /usr if /lib/modules doesn't exist

We need a source of "filler" that can fill up a 50M file system. Unfortunately, on some systems /lib/modules might not exist at all. In that case, use /usr instead.

---
 tests/generic/077 | 3 +++
 1 file changed, 3 insertions(+)
tests/generic/077 +3 -0
index 172ce6e..0d6aec7 100755
@@ -32,6 +32,9 @@ status=1
 # Something w/ enough data to fill 50M of fs...
 filler=/lib/modules/
 
+# fall back in case /lib/modules doesn't exist
+[ -d $filler ] || filler=/usr
+
 _cleanup()
 {
 	cd /
Signature · 1 line
2.0.0
#1 lore raw
Quoted 5 lines · Theodore Ts'o

We need a source of "filler" that can fill up a 50M file system. Unfortunately, on some systems /lib/modules might not exist at all. In that case, use /usr instead.

Seems reasonable.

Quoted 19 lines
---
 tests/generic/077 | 3 +++
 1 file changed, 3 insertions(+)
tests/generic/077 +3 -0
index 172ce6e..0d6aec7 100755
@@ -32,6 +32,9 @@ status=1
 # Something w/ enough data to fill 50M of fs...
 filler=/lib/modules/
 
+# fall back in case /lib/modules doesn't exist
+[ -d $filler ] || filler=/usr
+
 _cleanup()
 {
 	cd /