move cleanup to basic.target to avoid conflict
This commit is contained in:
parent
feb269ad3e
commit
3dc400e459
|
@ -258,13 +258,14 @@ EOF
|
||||||
|
|
||||||
# install services
|
# install services
|
||||||
local unitdir=/archroot/etc/systemd/system
|
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
|
cat > ${unitdir}/installer-cleanup.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Post-install cleanup
|
Description=Post-install cleanup
|
||||||
ConditionPathExists=/installer/script.sh
|
ConditionPathExists=/installer/script.sh
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/installer/script.sh
|
ExecStart=/installer/script.sh
|
||||||
|
@ -391,7 +392,7 @@ postinstall_main() {
|
||||||
# remove cleanup service
|
# remove cleanup service
|
||||||
local unitdir=/etc/systemd/system
|
local unitdir=/etc/systemd/system
|
||||||
rm -f ${unitdir}/installer-cleanup.service
|
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
|
# cleanup filesystem
|
||||||
rm -f /var/cache/pacman/pkg
|
rm -f /var/cache/pacman/pkg
|
||||||
|
|
Loading…
Reference in New Issue