blob: 2c01dea636f7c13a0dd844a904518f85d57cadb4 [file] [log] [blame]
Andrew Geissler20cff702020-03-09 16:51:27 -05001pkg_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
Andrew Geissler4ef0e112021-01-05 16:51:58 -060021 mkdir -p $D$systemd_system_unitdir/obmc-host-startmin@0.target.wants
22 LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/phosphor-set-host-transition-to-running@0.service"
23 TARGET="../phosphor-set-host-transition-to-running@.service"
24 ln -s $TARGET $LINK
25
26 mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants
27 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-set-host-transition-to-off@0.service"
28 TARGET="../phosphor-set-host-transition-to-off@.service"
29 ln -s $TARGET $LINK
30
Andrew Geissler20cff702020-03-09 16:51:27 -050031 mkdir -p $D$systemd_system_unitdir/obmc-host-reset@0.target.requires
32 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service"
33 TARGET="../phosphor-reset-host-check@.service"
34 ln -s $TARGET $LINK
35
36 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service"
37 TARGET="../phosphor-reset-sensor-states@.service"
38 ln -s $TARGET $LINK
39
40 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
41 TARGET="../phosphor-reset-host-running@.service"
42 ln -s $TARGET $LINK
43
Andrew Geisslerd3f1e5b2020-09-25 09:23:51 -050044 mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants
45 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
46 TARGET="../phosphor-reset-sensor-states@.service"
47 ln -s $TARGET $LINK
48
Andrew Geissler9c4b92b2020-09-25 14:32:57 -050049 mkdir -p $D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants
50 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
51 TARGET="../phosphor-reset-sensor-states@.service"
52 ln -s $TARGET $LINK
53
Andrew Geissler20cff702020-03-09 16:51:27 -050054 mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires
55 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
56 TARGET="../obmc-chassis-poweroff@.target"
57 ln -s $TARGET $LINK
58
59 mkdir -p $D$systemd_system_unitdir/obmc-host-reboot@0.target.requires
60 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target"
61 TARGET="../obmc-host-shutdown@.target"
62 ln -s $TARGET $LINK
63
64 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service"
65 TARGET="../phosphor-reboot-host@.service"
66 ln -s $TARGET $LINK
67
68 mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires
69 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
70 TARGET="../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
71 ln -s $TARGET $LINK
72
73 mkdir -p $D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires
74 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target"
75 TARGET="../obmc-host-stop@.target"
76 ln -s $TARGET $LINK
77
78 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service"
79 TARGET="../phosphor-reboot-host@.service"
80 ln -s $TARGET $LINK
81
82 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target"
83 TARGET="../obmc-host-force-warm-reboot@.target"
84 ln -s $TARGET $LINK
85
Andrew Geisslerb05ebce2020-11-04 16:41:45 +000086 mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants
87 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
88 TARGET="../phosphor-clear-one-time@.service"
89 ln -s $TARGET $LINK
Andrew Geissler20cff702020-03-09 16:51:27 -050090}
91
92pkg_prerm_${PN}-obmc-targets_append() {
93
94 LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target"
95 rm $LINK
96
97 LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service"
98 rm $LINK
99
100 LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target"
101 rm $LINK
102
103 LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service"
104 rm $LINK
105
Andrew Geissler4ef0e112021-01-05 16:51:58 -0600106 LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/phosphor-set-host-transition-to-running@0.service"
107 rm $LINK
108
109 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-set-host-transition-to-off@0.service"
110 rm $LINK
111
Andrew Geissler20cff702020-03-09 16:51:27 -0500112 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service"
113 rm $LINK
114
115 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service"
116 rm $LINK
117
Andrew Geisslerd3f1e5b2020-09-25 09:23:51 -0500118 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
119 rm $LINK
120
Andrew Geissler9c4b92b2020-09-25 14:32:57 -0500121 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
122 rm $LINK
123
Andrew Geissler20cff702020-03-09 16:51:27 -0500124 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
125 rm $LINK
126
127 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
128 rm $LINK
129
130 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target"
131 rm $LINK
132
133 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service"
134 rm $LINK
135
136 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
137 rm $LINK
138
139 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target"
140 rm $LINK
141
142 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service"
143 rm $LINK
144
145 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target"
146 rm $LINK
147
Andrew Geisslerb05ebce2020-11-04 16:41:45 +0000148 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
149 rm $LINK
Andrew Geissler20cff702020-03-09 16:51:27 -0500150}