Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The exit code of the RPM installation process is not 0 #231

Closed
zdyxry opened this issue Nov 20, 2021 · 0 comments · Fixed by #232
Closed

The exit code of the RPM installation process is not 0 #231

zdyxry opened this issue Nov 20, 2021 · 0 comments · Fixed by #232

Comments

@zdyxry
Copy link
Contributor

zdyxry commented Nov 20, 2021

When installing RPM, use setcap to set cap_net_raw capability in %post stage.

setap exit code with 1 . Maybe we should use setcap to specify specific files?

OS Version: CentOS 7
[root@node1 08:11:43 sbin]$rpm -qf `which setcap`
libcap-2.32-1.ky10.x86_64
[root@node1 08:11:56 sbin]$/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping*
fatal error: Invalid argument
usage: setcap [-q] [-v] [-n <rootid>] (-r|-|<caps>) <filename> [ ... (-r|-|<capsN>) <filenameN> ]

 Note <filename> must be a regular (non-symlink) file.
[root@node1 08:12:07 sbin]$/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping
[root@node1 08:12:10 sbin]$/usr/sbin/setcap cap_net_raw+ep /usr/sbin/fping6
[root@node1 08:12:12 sbin]$echo $?
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant