Add HW 3
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Docker exposes the filesystem source after the separator in mountinfo.
|
||||
# A bind mount whose host source is an ext4 filesystem on zram retains that
|
||||
# source; a plain host directory on the HDD must not pass this check.
|
||||
awk '
|
||||
$5 == "/hw/tests/tmp" {
|
||||
for (i = 6; i <= NF - 2; i++) {
|
||||
if ($i == "-" && $(i + 1) == "ext4" && $(i + 2) ~ /^\/dev\/zram[0-9]+$/)
|
||||
found = 1
|
||||
}
|
||||
}
|
||||
END { exit !found }
|
||||
' /proc/self/mountinfo
|
||||
Reference in New Issue
Block a user