Commit 24f704d1 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis
Browse files

Use socat rather than screen for xm commands


Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent 1ea8db72
......@@ -388,7 +388,7 @@ fi
: ${HELPER_USER:="nobody"}
: ${HELPER_CACHE_FILE:="@HELPER_DIR@/cache.tar"}
: ${HELPER_CACHE_PKGS:="@HELPER_DIR@/packages"}
: ${HELPER_EXTRA_PKGS:="iproute,socat,xenstore-utils,e2fsprogs,ntfs-3g,ntfsprogs,xmlstarlet,python,parted,reglookup,chntpw,util-linux"}
: ${HELPER_EXTRA_PKGS:="iptables,iproute,socat,xenstore-utils,e2fsprogs,ntfs-3g,ntfsprogs,xmlstarlet,python,parted,reglookup,chntpw,util-linux"}
: ${HELPER_LINUX_IMAGE_PKG:="linux-image-amd64"}
: ${HELPER_LINUX_IMAGE_XEN_PKG:="linux-image-xen-amd64"}
: ${HELPER_MIRROR:=""}
......
......@@ -53,7 +53,7 @@
# HELPER_EXTRA_PKGS: Extra packages that will need to be supplied
# to debootstrap to make the resulting helper image workable.
# DO NOT OVERWRITE THIS UNLESS YOU KNOW WHAT YOU ARE DOING
# HELPER_EXTRA_PKGS="iproute,socat,xenstore-utils,e2fsprogs,ntfs-3g,ntfsprogs,xmlstarlet,python,parted,reglookup,chntpw,util-linux"
# HELPER_EXTRA_PKGS="iptables,iproute,socat,xenstore-utils,e2fsprogs,ntfs-3g,ntfsprogs,xmlstarlet,python,parted,reglookup,chntpw,util-linux"
# HELPER_LINUX_IMAGE_PKG="linux-image-amd64"
# HELPER_LINUX_XEN_IMAGE_PKG="linux-image-xen-amd64"
......
......@@ -291,10 +291,11 @@ else
done
case \$hypervisor in
xen-pvm|xen-hvm)
mount -t xenfs xenfs /proc/xen
ip link set eth0 up
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
;;
mount -t xenfs xenfs /proc/xen
iptables -P OUTPUT DROP
ip6tables -P OUTPUT DROP
ip link set eth0 up
;;
esac
/usr/bin/snf-image-helper --force
fi
......
......@@ -28,13 +28,13 @@ launch_helper() {
xenstore-write helper/$helperid ""
xenstore-chmod helper/$helperid r0 w$helperid
tail -f --pid=$$ "$result_file" | sed -u 's|^|HELPER: |' &
brctl delif xenbr vif$helperid.0
screen -d -m -c /etc/screenrc bash -c 'socat STDIO INTERFACE:vif'$helperid'.0 | ./helper-monitor.py 1 > '$monitor_pipe' '
socat EXEC:"./helper-monitor.py ${MONITOR_FD}" INTERFACE:vif$helperid.0 &
$TIMEOUT -k $HELPER_HARD_TIMEOUT $HELPER_SOFT_TIMEOUT \
screen -D -m -c /etc/screenrc bash -c ' xm console '$helper_name' > '$result_file''
socat EXEC:"xm console $helper_name",pty STDOUT \
| sed -u 's|^|HELPER: |g'
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment