Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 1 | pkg_postinst:${PN}-obmc-targets:append() { |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 2 | |
| 3 | mkdir -p $D$systemd_system_unitdir/multi-user.target.requires |
| 4 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target" |
| 5 | TARGET="../obmc-host-reset@.target" |
| 6 | ln -s $TARGET $LINK |
| 7 | |
| 8 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service" |
| 9 | TARGET="../phosphor-discover-system-state@.service" |
| 10 | ln -s $TARGET $LINK |
| 11 | |
Andrew Geissler | 77c0126 | 2022-02-25 19:30:14 +0000 | [diff] [blame] | 12 | LINK="$D$systemd_system_unitdir/obmc-bmc-service-quiesce@0.target" |
| 13 | TARGET="./obmc-bmc-service-quiesce@.target" |
| 14 | ln -s $TARGET $LINK |
| 15 | |
Andrew Geissler | ef50c6a | 2021-09-17 18:01:30 +0000 | [diff] [blame] | 16 | mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants |
| 17 | LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/phosphor-reset-host-recovery@0.service" |
| 18 | TARGET="../phosphor-reset-host-recovery@.service" |
| 19 | ln -s $TARGET $LINK |
| 20 | |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 21 | mkdir -p $D$systemd_system_unitdir/obmc-host-start@0.target.requires |
| 22 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target" |
| 23 | TARGET="../obmc-host-startmin@.target" |
| 24 | ln -s $TARGET $LINK |
| 25 | |
| 26 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service" |
| 27 | TARGET="../phosphor-reset-host-reboot-attempts@.service" |
| 28 | ln -s $TARGET $LINK |
| 29 | |
Andrew Geissler | 4ef0e11 | 2021-01-05 16:51:58 -0600 | [diff] [blame] | 30 | mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.wants |
| 31 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/phosphor-set-host-transition-to-running@0.service" |
| 32 | TARGET="../phosphor-set-host-transition-to-running@.service" |
| 33 | ln -s $TARGET $LINK |
| 34 | |
| 35 | mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants |
| 36 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-set-host-transition-to-off@0.service" |
| 37 | TARGET="../phosphor-set-host-transition-to-off@.service" |
| 38 | ln -s $TARGET $LINK |
| 39 | |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 40 | mkdir -p $D$systemd_system_unitdir/obmc-host-reset@0.target.requires |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 41 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service" |
| 42 | TARGET="../phosphor-reset-host-running@.service" |
| 43 | ln -s $TARGET $LINK |
| 44 | |
Andrew Geissler | d3f1e5b | 2020-09-25 09:23:51 -0500 | [diff] [blame] | 45 | mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants |
| 46 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service" |
| 47 | TARGET="../phosphor-reset-sensor-states@.service" |
| 48 | ln -s $TARGET $LINK |
| 49 | |
Andrew Geissler | 9c4b92b | 2020-09-25 14:32:57 -0500 | [diff] [blame] | 50 | mkdir -p $D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants |
| 51 | LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service" |
| 52 | TARGET="../phosphor-reset-sensor-states@.service" |
| 53 | ln -s $TARGET $LINK |
| 54 | |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 55 | mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires |
| 56 | LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" |
| 57 | TARGET="../obmc-chassis-poweroff@.target" |
| 58 | ln -s $TARGET $LINK |
| 59 | |
| 60 | mkdir -p $D$systemd_system_unitdir/obmc-host-reboot@0.target.requires |
| 61 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" |
| 62 | TARGET="../obmc-host-shutdown@.target" |
| 63 | ln -s $TARGET $LINK |
| 64 | |
| 65 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 66 | TARGET="../phosphor-reboot-host@.service" |
| 67 | ln -s $TARGET $LINK |
| 68 | |
| 69 | mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires |
| 70 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 71 | TARGET="../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 72 | ln -s $TARGET $LINK |
| 73 | |
| 74 | mkdir -p $D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires |
| 75 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" |
| 76 | TARGET="../obmc-host-stop@.target" |
| 77 | ln -s $TARGET $LINK |
| 78 | |
| 79 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 80 | TARGET="../phosphor-reboot-host@.service" |
| 81 | ln -s $TARGET $LINK |
| 82 | |
| 83 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 84 | TARGET="../obmc-host-force-warm-reboot@.target" |
| 85 | ln -s $TARGET $LINK |
| 86 | |
Andrew Geissler | b05ebce | 2020-11-04 16:41:45 +0000 | [diff] [blame] | 87 | mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants |
| 88 | LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service" |
| 89 | TARGET="../phosphor-clear-one-time@.service" |
| 90 | ln -s $TARGET $LINK |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 91 | } |
| 92 | |
Andrew Geissler | a02a18a | 2022-02-21 23:00:20 +0000 | [diff] [blame] | 93 | pkg_postinst:${PN}-chassis-check-power-status:append() { |
| 94 | |
| 95 | mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires |
| 96 | LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires/phosphor-chassis-check-power-status@0.service" |
| 97 | TARGET="../phosphor-chassis-check-power-status@.service" |
| 98 | ln -s $TARGET $LINK |
| 99 | } |
| 100 | |
Patrick Williams | 12fc939 | 2021-08-06 09:16:53 -0500 | [diff] [blame] | 101 | pkg_prerm:${PN}-obmc-targets:append() { |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 102 | |
| 103 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target" |
| 104 | rm $LINK |
| 105 | |
| 106 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service" |
| 107 | rm $LINK |
| 108 | |
Andrew Geissler | ef50c6a | 2021-09-17 18:01:30 +0000 | [diff] [blame] | 109 | LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/phosphor-reset-host-recovery@0.service" |
| 110 | rm $LINK |
| 111 | |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 112 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target" |
| 113 | rm $LINK |
| 114 | |
| 115 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service" |
| 116 | rm $LINK |
| 117 | |
Andrew Geissler | 4ef0e11 | 2021-01-05 16:51:58 -0600 | [diff] [blame] | 118 | LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/phosphor-set-host-transition-to-running@0.service" |
| 119 | rm $LINK |
| 120 | |
| 121 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-set-host-transition-to-off@0.service" |
| 122 | rm $LINK |
| 123 | |
Andrew Geissler | d3f1e5b | 2020-09-25 09:23:51 -0500 | [diff] [blame] | 124 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service" |
| 125 | rm $LINK |
| 126 | |
Andrew Geissler | 9c4b92b | 2020-09-25 14:32:57 -0500 | [diff] [blame] | 127 | LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service" |
| 128 | rm $LINK |
| 129 | |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 130 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service" |
| 131 | rm $LINK |
| 132 | |
| 133 | LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" |
| 134 | rm $LINK |
| 135 | |
| 136 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" |
| 137 | rm $LINK |
| 138 | |
| 139 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 140 | rm $LINK |
| 141 | |
| 142 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 143 | rm $LINK |
| 144 | |
| 145 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" |
| 146 | rm $LINK |
| 147 | |
| 148 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 149 | rm $LINK |
| 150 | |
| 151 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 152 | rm $LINK |
| 153 | |
Andrew Geissler | b05ebce | 2020-11-04 16:41:45 +0000 | [diff] [blame] | 154 | LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service" |
| 155 | rm $LINK |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 156 | } |
Andrew Geissler | a02a18a | 2022-02-21 23:00:20 +0000 | [diff] [blame] | 157 | |
| 158 | pkg_prerm:${PN}-chassis-check-power-status:append() { |
| 159 | |
| 160 | LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.requires/phosphor-chassis-check-power-status@0.service" |
| 161 | rm $LINK |
| 162 | } |