blob: 92a5f4eeaa11487d806f55d4c8e8aec53e1b52c4 [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
Andrew Geissler20cff702020-03-09 16:51:27 -050032 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
33 TARGET="../phosphor-reset-host-running@.service"
34 ln -s $TARGET $LINK
35
Andrew Geisslerd3f1e5b2020-09-25 09:23:51 -050036 mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants
37 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
38 TARGET="../phosphor-reset-sensor-states@.service"
39 ln -s $TARGET $LINK
40
Andrew Geissler9c4b92b2020-09-25 14:32:57 -050041 mkdir -p $D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants
42 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
43 TARGET="../phosphor-reset-sensor-states@.service"
44 ln -s $TARGET $LINK
45
Andrew Geissler20cff702020-03-09 16:51:27 -050046 mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires
47 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
48 TARGET="../obmc-chassis-poweroff@.target"
49 ln -s $TARGET $LINK
50
51 mkdir -p $D$systemd_system_unitdir/obmc-host-reboot@0.target.requires
52 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target"
53 TARGET="../obmc-host-shutdown@.target"
54 ln -s $TARGET $LINK
55
56 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service"
57 TARGET="../phosphor-reboot-host@.service"
58 ln -s $TARGET $LINK
59
60 mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires
61 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
62 TARGET="../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
63 ln -s $TARGET $LINK
64
65 mkdir -p $D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires
66 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target"
67 TARGET="../obmc-host-stop@.target"
68 ln -s $TARGET $LINK
69
70 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service"
71 TARGET="../phosphor-reboot-host@.service"
72 ln -s $TARGET $LINK
73
74 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target"
75 TARGET="../obmc-host-force-warm-reboot@.target"
76 ln -s $TARGET $LINK
77
Andrew Geisslerb05ebce2020-11-04 16:41:45 +000078 mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants
79 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
80 TARGET="../phosphor-clear-one-time@.service"
81 ln -s $TARGET $LINK
Andrew Geissler20cff702020-03-09 16:51:27 -050082}
83
84pkg_prerm_${PN}-obmc-targets_append() {
85
86 LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target"
87 rm $LINK
88
89 LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service"
90 rm $LINK
91
92 LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target"
93 rm $LINK
94
95 LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service"
96 rm $LINK
97
Andrew Geissler4ef0e112021-01-05 16:51:58 -060098 LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.wants/phosphor-set-host-transition-to-running@0.service"
99 rm $LINK
100
101 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-set-host-transition-to-off@0.service"
102 rm $LINK
103
Andrew Geisslerd3f1e5b2020-09-25 09:23:51 -0500104 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service"
105 rm $LINK
106
Andrew Geissler9c4b92b2020-09-25 14:32:57 -0500107 LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service"
108 rm $LINK
109
Andrew Geissler20cff702020-03-09 16:51:27 -0500110 LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service"
111 rm $LINK
112
113 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target"
114 rm $LINK
115
116 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target"
117 rm $LINK
118
119 LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service"
120 rm $LINK
121
122 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service"
123 rm $LINK
124
125 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target"
126 rm $LINK
127
128 LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service"
129 rm $LINK
130
131 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target"
132 rm $LINK
133
Andrew Geisslerb05ebce2020-11-04 16:41:45 +0000134 LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service"
135 rm $LINK
Andrew Geissler20cff702020-03-09 16:51:27 -0500136}