blob: c93503ee5b53e0c795ccb298f0c588a3871830d4 [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 Geissleref50c6a2021-09-17 18:01:30 +000012 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 Geissler20cff702020-03-09 16:51:27 -050017 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 Geissler4ef0e112021-01-05 16:51:58 -060026 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 Geissler20cff702020-03-09 16:51:27 -050036 mkdir -p $D$systemd_system_unitdir/obmc-host-reset@0.target.requires
Andrew Geissler20cff702020-03-09 16:51:27 -050037 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 Geisslerd3f1e5b2020-09-25 09:23:51 -050041 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 Geissler9c4b92b2020-09-25 14:32:57 -050046 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 Geissler20cff702020-03-09 16:51:27 -050051 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 Geisslerb05ebce2020-11-04 16:41:45 +000083 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 Geissler20cff702020-03-09 16:51:27 -050087}
88
Andrew Geisslera02a18a2022-02-21 23:00:20 +000089pkg_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 Williams12fc9392021-08-06 09:16:53 -050097pkg_prerm:${PN}-obmc-targets:append() {
Andrew Geissler20cff702020-03-09 16:51:27 -050098
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 Geissleref50c6a2021-09-17 18:01:30 +0000105 LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/phosphor-reset-host-recovery@0.service"
106 rm $LINK
107
Andrew Geissler20cff702020-03-09 16:51:27 -0500108 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 Geissler4ef0e112021-01-05 16:51:58 -0600114 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 Geisslerd3f1e5b2020-09-25 09:23:51 -0500120 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
121 rm $LINK
122
Andrew Geissler9c4b92b2020-09-25 14:32:57 -0500123 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
124 rm $LINK
125
Andrew Geissler20cff702020-03-09 16:51:27 -0500126 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 Geisslerb05ebce2020-11-04 16:41:45 +0000150 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
151 rm $LINK
Andrew Geissler20cff702020-03-09 16:51:27 -0500152}
Andrew Geisslera02a18a2022-02-21 23:00:20 +0000153
154pkg_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}