From 7faa48ae04588d4c9a529156218691a53ee35421 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 17 Aug 2016 17:18:21 +0200 Subject: 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. --- init.d/bootmisc.in | 6 ++++-- 1 file 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 -- cgit v1.2.3