forked from Mellanox/bfscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbfscripts.spec
More file actions
90 lines (77 loc) · 1.73 KB
/
bfscripts.spec
File metadata and controls
90 lines (77 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Summary: Install BlueField scripts
Name: bfscripts
Version: 1.1
Release: r0
License: BSD
Group: base
Packager: Poky <poky@yoctoproject.org>
BuildRequires: systemd-systemctl-native
Requires: /bin/bash
Requires: /bin/sh
Requires: /usr/bin/env
Requires: bash
Requires: mlxbf-bootctl
Requires: mlxbf-bootimages
Requires(post): /bin/bash
Requires(post): /bin/sh
Requires(post): /usr/bin/env
Requires(post): bash
Requires(post): mlxbf-bootctl
Requires(post): mlxbf-bootimages
Requires(preun): /bin/bash
Requires(preun): /bin/sh
Requires(preun): /usr/bin/env
Requires(preun): bash
Requires(preun): mlxbf-bootctl
Requires(preun): mlxbf-bootimages
%description
Install BlueField scripts.
%post
# bfscripts - postinst
#!/bin/sh
set -e
OPTS=""
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
if type systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
systemctl daemon-reload
fi
systemctl $OPTS enable bfvcheck.service
if [ -z "$D" -a "enable" = "enable" ]; then
systemctl --no-block restart bfvcheck.service
fi
fi
%preun
# bfscripts - prerm
#!/bin/sh
if [ "$1" = "0" ] ; then
set -e
OPTS=""
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
if type systemctl >/dev/null 2>/dev/null; then
if [ -z "$D" ]; then
systemctl stop bfvcheck.service
fi
systemctl $OPTS disable bfvcheck.service
fi
fi
%files
%defattr(-,-,-,-)
"/opt/mlnx"
"/opt/mellanox/scripts/bfver"
"/opt/mellanox/scripts/bfcpu-freq"
"/opt/mellanox/scripts/mlx-mkbfb"
"/opt/mellanox/scripts/bfinst"
"/opt/mellanox/scripts/build-bfb"
"/opt/mellanox/scripts/bfpart"
"/opt/mellanox/scripts/bfpxe"
"/opt/mellanox/scripts/bfvcheck"
"/opt/mellanox/scripts/bffamily"
"/opt/mellanox/scripts/bfdracut"
"/opt/mellanox/scripts/bfrec"
"/opt/mellanox/scripts/bfbootmgr"
"/lib/systemd/system/bfvcheck.service"