Need help with building an RPM and performing a check in the build phase
I'm building an RPM, and can successfully do so.
I'd like to add a check in my .spec file to see if a uid is already in use and exit the whole process if it is already in use. I tried this in %prep: Code:
if [ -z `/bin/cat /etc/passwd | /bin/grep 89` ]; then Code:
if [ -z `/bin/grep 89 /etc/passwd` ]; then Anyone have any suggestions? Thanks in advance. |
The %prep phase only concerns building the package so this does not make a lot of sense to me: after all you can not control where the package will be built. If you still want to kill it you could try something like 'getent passwd 89 >/dev/null 2>&1||pkill -9 -f "rpmbuild -"' thought that doesn't leave the process any time to clean up the build dir or whatever else.
|
All times are GMT -5. The time now is 08:09 AM. |