Diff of /mcore-src/trunk/mcore-tools/src/include/common.global.class.in
Parent Directory | Revision Log | Patch
revision 2351 by niro, Mon Aug 24 10:27:46 2015 UTC | revision 2407 by niro, Mon Aug 31 09:02:48 2015 UTC | |
---|---|---|
# | Line 253 system_chroot() | Line 253 system_chroot() |
253 | ||
254 | chroot ${MROOT} ${cmd} | chroot ${MROOT} ${cmd} |
255 | } | } |
256 | ||
257 | # gets interface used to reach given ip | |
258 | iface_for_remote_addr() | |
259 | { | |
260 | set -- $(ip -o route get to $1) | |
261 | echo $5 | |
262 | } | |
263 | ||
264 | # get ip from dns name | |
265 | dns_to_ip() | |
266 | { | |
267 | set -- $(getent hosts $1) | |
268 | echo $1 | |
269 | } |
|