blob: 6cee30287b641d4082fc4d43de0914ab37d3676a [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
Patrick Williams12fc9392021-08-06 09:16:53 -050089pkg_prerm:${PN}-obmc-targets:append() {
Andrew Geissler20cff702020-03-09 16:51:27 -050090
91 LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target"
92 rm $LINK
93
94 LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service"
95 rm $LINK
96
Andrew Geissleref50c6a2021-09-17 18:01:30 +000097 LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/phosphor-reset-host-recovery@0.service"
98 rm $LINK
99
Andrew Geissler20cff702020-03-09 16:51:27 -0500100 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 Geisslerd3f1e5b2020-09-25 09:23:51 -0500112 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
113 rm $LINK
114
Andrew Geissler9c4b92b2020-09-25 14:32:57 -0500115 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
116 rm $LINK
117
Andrew Geissler20cff702020-03-09 16:51:27 -0500118 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
119 rm $LINK
120
121 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
122 rm $LINK
123
124 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target"
125 rm $LINK
126
127 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service"
128 rm $LINK
129
130 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
131 rm $LINK
132
133 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target"
134 rm $LINK
135
136 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service"
137 rm $LINK
138
139 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target"
140 rm $LINK
141
Andrew Geisslerb05ebce2020-11-04 16:41:45 +0000142 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
143 rm $LINK
Andrew Geissler20cff702020-03-09 16:51:27 -0500144}