blob: 10e255d580a4964904c484906d2830f3cb39dad3 [file] [log] [blame]
Andrew Geissler5059a442020-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 Geissler56b79282021-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 Geissler5059a442020-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 Geissler6f640bd2020-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 Geissler1ac5d202020-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 Geissler5059a442020-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
86 mkdir -p $D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires
87 LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target"
88 TARGET="../obmc-host-force-warm-reboot@.target"
89 ln -s $TARGET $LINK
Andrew Geissler948e50a2020-11-04 16:41:45 +000090
91 mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants
92 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
93 TARGET="../phosphor-clear-one-time@.service"
94 ln -s $TARGET $LINK
Andrew Geissler5059a442020-03-09 16:51:27 -050095}
96
97pkg_prerm_${PN}-obmc-targets_append() {
98
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
105 LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target"
106 rm $LINK
107
108 LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service"
109 rm $LINK
110
Andrew Geissler56b79282021-01-05 16:51:58 -0600111 LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/phosphor-set-host-transition-to-running@0.service"
112 rm $LINK
113
114 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-set-host-transition-to-off@0.service"
115 rm $LINK
116
Andrew Geissler5059a442020-03-09 16:51:27 -0500117 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service"
118 rm $LINK
119
120 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service"
121 rm $LINK
122
Andrew Geissler6f640bd2020-09-25 09:23:51 -0500123 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
124 rm $LINK
125
Andrew Geissler1ac5d202020-09-25 14:32:57 -0500126 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
127 rm $LINK
128
Andrew Geissler5059a442020-03-09 16:51:27 -0500129 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
130 rm $LINK
131
132 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
133 rm $LINK
134
135 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target"
136 rm $LINK
137
138 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service"
139 rm $LINK
140
141 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
142 rm $LINK
143
144 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target"
145 rm $LINK
146
147 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service"
148 rm $LINK
149
150 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target"
151 rm $LINK
152
153 LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target"
154 rm $LINK
Andrew Geissler948e50a2020-11-04 16:41:45 +0000155
156 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
157 rm $LINK
Andrew Geissler5059a442020-03-09 16:51:27 -0500158}