aports/main/alpine-baselayout/alpine-baselayout.post-install
Sertonix 66187892e0 main/alpine-baselayout: fix chown file not found error
The etc/shadow- file may not exist when chown is run. Only run chown
when the file exists to prevent an error message.
2024-05-06 07:38:55 +00:00

14 lines
453 B
Bash

#!/bin/sh
# update color_prompt.sh symlink (if exists) after we renamed color_prompt to
# color_prompt.sh.disabled.
case "$(readlink etc/profile.d/color_prompt.sh 2>/dev/null || true)" in
color_prompt) ln -sf color_prompt.sh.disabled etc/profile.d/color_prompt.sh;;
esac
# the /etc/group file is created after /etc/shadow. Needed to apply the group
# properly.
chown root:shadow etc/shadow
[ -e etc/shadow- ] && chown root:shadow etc/shadow-
exit 0