Browse Source

Don't create /var/run symlink when this path already exists

Fixes #7
Closes #8
Jakub Jirutka 5 years ago
parent
commit
efac8a92a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      alpine-make-rootfs

+ 1 - 1
alpine-make-rootfs

@@ -392,7 +392,7 @@ if ! _apk info --root "$rootfs" --quiet --installed alpine-base; then
 		| tar -xz -C "$rootfs" etc >&2
 fi
 
-ln -sf /run "$rootfs"/var/run
+[ -e "$rootfs"/var/run ] || ln -s /run "$rootfs"/var/run
 
 #-----------------------------------------------------------------------
 if [ "$TIMEZONE" ]; then