Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 1 | pkg_postinst_${PN}-obmc-targets_append() { |
| 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 | |
| 12 | mkdir -p $D$systemd_system_unitdir/obmc-host-start@0.target.requires |
| 13 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target" |
| 14 | TARGET="../obmc-host-startmin@.target" |
| 15 | ln -s $TARGET $LINK |
| 16 | |
| 17 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service" |
| 18 | TARGET="../phosphor-reset-host-reboot-attempts@.service" |
| 19 | ln -s $TARGET $LINK |
| 20 | |
| 21 | mkdir -p $D$systemd_system_unitdir/obmc-host-reset@0.target.requires |
| 22 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service" |
| 23 | TARGET="../phosphor-reset-host-check@.service" |
| 24 | ln -s $TARGET $LINK |
| 25 | |
| 26 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service" |
| 27 | TARGET="../phosphor-reset-sensor-states@.service" |
| 28 | ln -s $TARGET $LINK |
| 29 | |
| 30 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service" |
| 31 | TARGET="../phosphor-reset-host-running@.service" |
| 32 | ln -s $TARGET $LINK |
| 33 | |
Andrew Geissler | d3f1e5b | 2020-09-25 09:23:51 -0500 | [diff] [blame] | 34 | mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants |
| 35 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service" |
| 36 | TARGET="../phosphor-reset-sensor-states@.service" |
| 37 | ln -s $TARGET $LINK |
| 38 | |
Andrew Geissler | 9c4b92b | 2020-09-25 14:32:57 -0500 | [diff] [blame] | 39 | mkdir -p $D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants |
| 40 | LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service" |
| 41 | TARGET="../phosphor-reset-sensor-states@.service" |
| 42 | ln -s $TARGET $LINK |
| 43 | |
Andrew Geissler | 20cff70 | 2020-03-09 16:51:27 -0500 | [diff] [blame] | 44 | mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires |
| 45 | LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" |
| 46 | TARGET="../obmc-chassis-poweroff@.target" |
| 47 | ln -s $TARGET $LINK |
| 48 | |
| 49 | mkdir -p $D$systemd_system_unitdir/obmc-host-reboot@0.target.requires |
| 50 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" |
| 51 | TARGET="../obmc-host-shutdown@.target" |
| 52 | ln -s $TARGET $LINK |
| 53 | |
| 54 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 55 | TARGET="../phosphor-reboot-host@.service" |
| 56 | ln -s $TARGET $LINK |
| 57 | |
| 58 | mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires |
| 59 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 60 | TARGET="../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 61 | ln -s $TARGET $LINK |
| 62 | |
| 63 | mkdir -p $D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires |
| 64 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" |
| 65 | TARGET="../obmc-host-stop@.target" |
| 66 | ln -s $TARGET $LINK |
| 67 | |
| 68 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 69 | TARGET="../phosphor-reboot-host@.service" |
| 70 | ln -s $TARGET $LINK |
| 71 | |
| 72 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 73 | TARGET="../obmc-host-force-warm-reboot@.target" |
| 74 | ln -s $TARGET $LINK |
| 75 | |
| 76 | mkdir -p $D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires |
| 77 | LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 78 | TARGET="../obmc-host-force-warm-reboot@.target" |
| 79 | ln -s $TARGET $LINK |
| 80 | } |
| 81 | |
| 82 | pkg_prerm_${PN}-obmc-targets_append() { |
| 83 | |
| 84 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target" |
| 85 | rm $LINK |
| 86 | |
| 87 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service" |
| 88 | rm $LINK |
| 89 | |
| 90 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target" |
| 91 | rm $LINK |
| 92 | |
| 93 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service" |
| 94 | rm $LINK |
| 95 | |
| 96 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service" |
| 97 | rm $LINK |
| 98 | |
| 99 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service" |
| 100 | rm $LINK |
| 101 | |
Andrew Geissler | d3f1e5b | 2020-09-25 09:23:51 -0500 | [diff] [blame] | 102 | LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service" |
| 103 | rm $LINK |
| 104 | |
Andrew Geissler | 9c4b92b | 2020-09-25 14:32:57 -0500 | [diff] [blame] | 105 | LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@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-reset@0.target.requires/phosphor-reset-host-running@0.service" |
| 109 | rm $LINK |
| 110 | |
| 111 | LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" |
| 112 | rm $LINK |
| 113 | |
| 114 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" |
| 115 | rm $LINK |
| 116 | |
| 117 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 118 | rm $LINK |
| 119 | |
| 120 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 121 | rm $LINK |
| 122 | |
| 123 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" |
| 124 | rm $LINK |
| 125 | |
| 126 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 127 | rm $LINK |
| 128 | |
| 129 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 130 | rm $LINK |
| 131 | |
| 132 | LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 133 | rm $LINK |
| 134 | } |