Overview

Request 1090230 accepted

- Use the bash intrinsic virtual file /dev/tcp/localhost/
to check for MTA port

- Avoid fuser for detecting if sendmail is listen on MTA port

Loading...

Jan Engelhardt's avatar
reviewer source maintainer

you could just evaluate ss -Hlnpt "sport == $port" | grep -q . to see if it's up


Dr. Werner Fink's avatar

I know ... also nmap/netstat or many more ... this is a bash shell script and it works without having a further requirement


Jan Engelhardt's avatar
reviewer source maintainer

Another option (since you are already exercising bash-only features) (echo >/dev/tcp/localhost/25) 2>/dev/zero and evaluating $?


Dr. Werner Fink's avatar

I do not have a /dev/tcp/ here ... seems to require an other udev rule ... or bash had not shown this here


Jan Engelhardt's avatar
reviewer source maintainer

it's not a device, it's a bash feature

Request History
Dr. Werner Fink's avatar

WernerFink created request

- Use the bash intrinsic virtual file /dev/tcp/localhost/
to check for MTA port

- Avoid fuser for detecting if sendmail is listen on MTA port


Staging Bot's avatar

staging-bot set openSUSE:Factory:Staging:D as a staging project

Being evaluated by staging project "openSUSE:Factory:Staging:D"


Staging Bot's avatar

staging-bot accepted review

Picked "openSUSE:Factory:Staging:D"


Factory Auto's avatar

factory-auto added opensuse-review-team as a reviewer

Please review sources


Factory Auto's avatar

factory-auto accepted review

Check script succeeded


Saul Goodman's avatar

licensedigger accepted review

ok


Dominique Leuenberger's avatar

dimstar accepted review


Dominique Leuenberger's avatar

dimstar_suse accepted review

Staging Project openSUSE:Factory:Staging:D got accepted.


Dominique Leuenberger's avatar

dimstar_suse approved review

Staging Project openSUSE:Factory:Staging:D got accepted.


Dominique Leuenberger's avatar

dimstar_suse accepted request

Staging Project openSUSE:Factory:Staging:D got accepted.

openSUSE Build Service is sponsored by