Andrew Geissler | 5059a44 | 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 | |
| 34 | mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires |
| 35 | LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" |
| 36 | TARGET="../obmc-chassis-poweroff@.target" |
| 37 | ln -s $TARGET $LINK |
| 38 | |
| 39 | mkdir -p $D$systemd_system_unitdir/obmc-host-reboot@0.target.requires |
| 40 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" |
| 41 | TARGET="../obmc-host-shutdown@.target" |
| 42 | ln -s $TARGET $LINK |
| 43 | |
| 44 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 45 | TARGET="../phosphor-reboot-host@.service" |
| 46 | ln -s $TARGET $LINK |
| 47 | |
| 48 | mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires |
| 49 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 50 | TARGET="../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 51 | ln -s $TARGET $LINK |
| 52 | |
| 53 | mkdir -p $D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires |
| 54 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" |
| 55 | TARGET="../obmc-host-stop@.target" |
| 56 | ln -s $TARGET $LINK |
| 57 | |
| 58 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 59 | TARGET="../phosphor-reboot-host@.service" |
| 60 | ln -s $TARGET $LINK |
| 61 | |
| 62 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 63 | TARGET="../obmc-host-force-warm-reboot@.target" |
| 64 | ln -s $TARGET $LINK |
| 65 | |
| 66 | mkdir -p $D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires |
| 67 | LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 68 | TARGET="../obmc-host-force-warm-reboot@.target" |
| 69 | ln -s $TARGET $LINK |
| 70 | } |
| 71 | |
| 72 | pkg_prerm_${PN}-obmc-targets_append() { |
| 73 | |
| 74 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target" |
| 75 | rm $LINK |
| 76 | |
| 77 | LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service" |
| 78 | rm $LINK |
| 79 | |
| 80 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target" |
| 81 | rm $LINK |
| 82 | |
| 83 | LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service" |
| 84 | rm $LINK |
| 85 | |
| 86 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service" |
| 87 | rm $LINK |
| 88 | |
| 89 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service" |
| 90 | rm $LINK |
| 91 | |
| 92 | LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service" |
| 93 | rm $LINK |
| 94 | |
| 95 | LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" |
| 96 | rm $LINK |
| 97 | |
| 98 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" |
| 99 | rm $LINK |
| 100 | |
| 101 | LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 102 | rm $LINK |
| 103 | |
| 104 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" |
| 105 | rm $LINK |
| 106 | |
| 107 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" |
| 108 | rm $LINK |
| 109 | |
| 110 | LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" |
| 111 | rm $LINK |
| 112 | |
| 113 | LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 114 | rm $LINK |
| 115 | |
| 116 | LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target" |
| 117 | rm $LINK |
| 118 | } |