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