mirror of
https://github.com/troglobit/finit.git
synced 2026-10-30 12:50:34 +00:00
test: Only copy /tmp contents if there are any
Signed-off-by: Jacques de Laval <jacques@de-laval.se>
This commit is contained in:
1 parent
7c45fd451e
commit
aa096cde19
1 file changed
+8
-4
@@ -10,10 +10,14 @@ mount -n -t tmpfs none /dev
|
|||||||
mount -t proc none /proc
|
mount -t proc none /proc
|
||||||
mount -t sysfs none /sys
|
mount -t sysfs none /sys
|
||||||
|
|
||||||
mkdir -p /tmp.shadow
|
if [ "$(ls -A /tmp)" ]; then
|
||||||
mount --bind /tmp /tmp.shadow
|
mkdir -p /tmp.shadow
|
||||||
mount -t tmpfs none /tmp
|
mount --bind /tmp /tmp.shadow
|
||||||
cp -a /tmp.shadow/* /tmp/
|
mount -t tmpfs none /tmp
|
||||||
|
cp -a /tmp.shadow/* /tmp/
|
||||||
|
else
|
||||||
|
mount -t tmpfs none /tmp
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "$FINIT_RCSD"
|
mkdir -p "$FINIT_RCSD"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user