Commit 22b54ec2 authored by Natanael Copa's avatar Natanael Copa

main/alpine-baselayout: fix /var/spool/mail -> /var/mail migration

we need to migrate the content of /var/spool/mail in pre-upgrade script
because apk will not be able to create the /var/spool/mail symlink if
there are an existing /var/spool/mail directory.
parent 3975f8d7
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=alpine-baselayout
pkgver=3.2.0
pkgrel=0
pkgrel=1
pkgdesc="Alpine base dir structure and init scripts"
url="https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout"
arch="all"
......
......@@ -21,6 +21,13 @@ if [ -d /var/run ]; then
ln -s ../run /var/run
fi
# migrate /var/spool/mail directory to /var/mail
if [ -d /var/spool/mail ]; then
mkdir -p /var/mail
cp -a /var/spool/mail/* /var/mail/ 2>/dev/null
rm -rf /var/spool/mail
ln -s ../mail /var/spool/mail
fi
addgroup -S -g 42 shadow 2>/dev/null
exit 0
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment