mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07: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:
@@ -10,10 +10,14 @@ mount -n -t tmpfs none /dev
|
||||
mount -t proc none /proc
|
||||
mount -t sysfs none /sys
|
||||
|
||||
mkdir -p /tmp.shadow
|
||||
mount --bind /tmp /tmp.shadow
|
||||
mount -t tmpfs none /tmp
|
||||
cp -a /tmp.shadow/* /tmp/
|
||||
if [ "$(ls -A /tmp)" ]; then
|
||||
mkdir -p /tmp.shadow
|
||||
mount --bind /tmp /tmp.shadow
|
||||
mount -t tmpfs none /tmp
|
||||
cp -a /tmp.shadow/* /tmp/
|
||||
else
|
||||
mount -t tmpfs none /tmp
|
||||
fi
|
||||
|
||||
mkdir -p "$FINIT_RCSD"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user