aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-08-17 17:18:21 +0200
committerWilliam Hubbs <w.d.hubbs@gmail.com>2021-09-15 10:21:12 -0500
commit7faa48ae04588d4c9a529156218691a53ee35421 (patch)
tree39523100f3e79703336e3f62086ce9372b3a43d9
parent93d600c0a49ab21ab551b62aba985d32ed4fcf1f (diff)
hide error when migrating /var/run to /run
The script tries to copy non-existing files. We simply hide the error http://bugs.alpinelinux.org/issues/3160 This fixes #451.
-rw-r--r--init.d/bootmisc.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/init.d/bootmisc.in b/init.d/bootmisc.in
index 43da1869..b1a849a3 100644
--- a/init.d/bootmisc.in
+++ b/init.d/bootmisc.in
@@ -113,8 +113,10 @@ migrate_to_run()
rm $src
elif [ ! -L $src -a -d $src ]; then
ebegin "Migrating $src to $dst"
- cp -a $src/* $dst/
- rm -rf $src
+ if ! rmdir $src 2>/dev/null; then
+ cp -a $src/* $dst/
+ rm -rf $src
+ fi
eend $?
fi
# If $src doesn't exist at all, just run this