blob: 71f7d8e34f61730553a99974f4a2ff37fe5e759c [file] [log] [blame]
Patrick Williams12fc9392021-08-06 09:16:53 -05001pkg_postinst:${PN}-obmc-targets:append() {
Andrew Geissler20cff702020-03-09 16:51:27 -05002
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 Geissler77c01262022-02-25 19:30:14 +000012 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 Geissleref50c6a2021-09-17 18:01:30 +000016 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 Geissler20cff702020-03-09 16:51:27 -050021 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 Geissler4ef0e112021-01-05 16:51:58 -060030 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 Geissler20cff702020-03-09 16:51:27 -050040 mkdir -p $D$systemd_system_unitdir/obmc-host-reset@0.target.requires
Andrew Geissler20cff702020-03-09 16:51:27 -050041 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 Geisslerd3f1e5b2020-09-25 09:23:51 -050045 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 Geissler9c4b92b2020-09-25 14:32:57 -050050 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 Geissler20cff702020-03-09 16:51:27 -050055 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 Geisslerb05ebce2020-11-04 16:41:45 +000087 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 Geissler20cff702020-03-09 16:51:27 -050091}
92
Andrew Geisslera02a18a2022-02-21 23:00:20 +000093pkg_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 Williams12fc9392021-08-06 09:16:53 -0500101pkg_prerm:${PN}-obmc-targets:append() {
Andrew Geissler20cff702020-03-09 16:51:27 -0500102
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 Geissleref50c6a2021-09-17 18:01:30 +0000109 LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/phosphor-reset-host-recovery@0.service"
110 rm $LINK
111
Andrew Geissler20cff702020-03-09 16:51:27 -0500112 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 Geissler4ef0e112021-01-05 16:51:58 -0600118 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 Geisslerd3f1e5b2020-09-25 09:23:51 -0500124 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
125 rm $LINK
126
Andrew Geissler9c4b92b2020-09-25 14:32:57 -0500127 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
128 rm $LINK
129
Andrew Geissler20cff702020-03-09 16:51:27 -0500130 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 Geisslerb05ebce2020-11-04 16:41:45 +0000154 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
155 rm $LINK
Andrew Geissler20cff702020-03-09 16:51:27 -0500156}
Andrew Geisslera02a18a2022-02-21 23:00:20 +0000157
158pkg_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}