git://git.onelab.eu
/
myplc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various tweaks for myplc-native (not thoroughly tested yet) :
[myplc.git]
/
plc.d
/
functions
diff --git
a/plc.d/functions
b/plc.d/functions
index
50f0847
..
29c5881
100644
(file)
--- a/
plc.d/functions
+++ b/
plc.d/functions
@@
-78,7
+78,7
@@
plc_daemon ()
# Print IP address of hostname if resolvable
gethostbyname ()
{
# Print IP address of hostname if resolvable
gethostbyname ()
{
- p
erl -MSocket -e '($a,$b,$c,$d,@addrs) = gethostbyname($ARGV[0]); print inet_ntoa($addrs[0]) . "\n";
' $1 2>/dev/null
+ p
ython -c 'import socket; import sys; print socket.gethostbyname(sys.argv[1])
' $1 2>/dev/null
}
# Forcefully make a symlink
}
# Forcefully make a symlink