ci/init-stage1: avoid duplicate mounts
Check if filesystems are mounted before attempting to mount them, and use mkdir -p to prevent errors if directories already exist. Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35961>
This commit is contained in:
@@ -13,13 +13,13 @@ cd /
|
||||
|
||||
findmnt --mountpoint /proc || mount -t proc none /proc
|
||||
findmnt --mountpoint /sys || mount -t sysfs none /sys
|
||||
mount -t debugfs none /sys/kernel/debug
|
||||
findmnt --mountpoint /sys/kernel/debug || mount -t debugfs none /sys/kernel/debug
|
||||
findmnt --mountpoint /dev || mount -t devtmpfs none /dev
|
||||
mkdir -p /dev/pts
|
||||
mount -t devpts devpts /dev/pts
|
||||
mkdir /dev/shm
|
||||
mount -t tmpfs -o noexec,nodev,nosuid tmpfs /dev/shm
|
||||
mount -t tmpfs tmpfs /tmp
|
||||
findmnt --mountpoint /dev/pts || mount -t devpts devpts /dev/pts
|
||||
mkdir -p /dev/shm
|
||||
findmnt --mountpoint /dev/shm || mount -t tmpfs -o noexec,nodev,nosuid tmpfs /dev/shm
|
||||
findmnt --mountpoint /tmp || mount -t tmpfs tmpfs /tmp
|
||||
|
||||
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
[ -z "$NFS_SERVER_IP" ] || echo "$NFS_SERVER_IP caching-proxy" >> /etc/hosts
|
||||
|
||||
Reference in New Issue
Block a user