From 57ef9b88e3116913c557a9c20415bcf50b940106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xerxes=20R=C3=A5nby?= Date: Tue, 2 Jul 2019 15:54:25 +0200 Subject: [PATCH] stage2/00-copies-and-fills/02-run.sh: Fix re-runs of script (#301) Check that file exist before move. --- stage2/00-copies-and-fills/02-run.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stage2/00-copies-and-fills/02-run.sh b/stage2/00-copies-and-fills/02-run.sh index a7ab5ec..366ac24 100755 --- a/stage2/00-copies-and-fills/02-run.sh +++ b/stage2/00-copies-and-fills/02-run.sh @@ -1,3 +1,6 @@ #!/bin/bash -e -mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" +if [ -f "${ROOTFS_DIR}/etc/ld.so.preload" ]; then + mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" +fi +