move cleanup to basic.target to avoid conflict

This commit is contained in:
gh2o 2014-07-13 19:50:27 -07:00
parent feb269ad3e
commit 3dc400e459
1 changed files with 4 additions and 3 deletions

View File

@ -258,13 +258,14 @@ EOF
# install services
local unitdir=/archroot/etc/systemd/system
mkdir -p ${unitdir}/sysinit.target.wants
ln -s ../installer-cleanup.service ${unitdir}/sysinit.target.wants/
mkdir -p ${unitdir}/basic.target.wants
ln -s ../installer-cleanup.service ${unitdir}/basic.target.wants/
cat > ${unitdir}/installer-cleanup.service <<EOF
[Unit]
Description=Post-install cleanup
ConditionPathExists=/installer/script.sh
[Service]
Type=oneshot
ExecStart=/installer/script.sh
@ -391,7 +392,7 @@ postinstall_main() {
# remove cleanup service
local unitdir=/etc/systemd/system
rm -f ${unitdir}/installer-cleanup.service
rm -f ${unitdir}/sysinit.target.wants/installer-cleanup.service
rm -f ${unitdir}/basic.target.wants/installer-cleanup.service
# cleanup filesystem
rm -f /var/cache/pacman/pkg