diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-24 16:01:36 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-11-24 16:01:36 +0000 |
commit | 9f0f0d9a0679bffa14141a444612c48f20c7bb64 (patch) | |
tree | 8a2acd9a440dd843cdaaac9b0f5ef432e97df7b4 /main | |
parent | 164c06ca578241499e1c0badeef98ab41569d98b (diff) | |
download | aports-9f0f0d9a0679bffa14141a444612c48f20c7bb64.tar.bz2 aports-9f0f0d9a0679bffa14141a444612c48f20c7bb64.tar.xz |
main/xen: add tmux support
remove screen from deps. use no console as default
Diffstat (limited to 'main')
-rw-r--r-- | main/xen/APKBUILD | 16 | ||||
-rw-r--r-- | main/xen/xendomains.confd | 22 | ||||
-rw-r--r-- | main/xen/xendomains.initd | 36 |
3 files changed, 53 insertions, 21 deletions
diff --git a/main/xen/APKBUILD b/main/xen/APKBUILD index 4e1d28efc3..7a95eead2c 100644 --- a/main/xen/APKBUILD +++ b/main/xen/APKBUILD @@ -3,12 +3,12 @@ # Maintainer: William Pitcock <nenolod@dereferenced.org> pkgname=xen pkgver=4.4.1 -pkgrel=5 +pkgrel=6 pkgdesc="Xen hypervisor" url="http://www.xen.org/" arch="x86_64" license="GPL" -depends="syslinux bash screen iproute2 logrotate" +depends="syslinux bash iproute2 logrotate" depends_dev="openssl-dev python-dev e2fsprogs-dev gettext zlib-dev ncurses-dev libiconv-dev dev86 texinfo perl iasl pciutils-dev glib-dev yajl-dev spice-dev gnutls-dev curl-dev libaio-dev lzo-dev xz-dev util-linux-dev @@ -230,8 +230,8 @@ c13f954d041a6fa78d0d241ad1780c0b elf_local.h d86504e12f05deca6b3eeeb90157160e xenstored.confd ed262f15fb880badb53575539468646c xenconsoled.initd ec2252c72050d7d5870a3a629b873ba6 xenconsoled.confd -03858ab5dda5b95ef344ddeb7340fcc9 xendomains.initd -2c80e442cec6dd2a025b61852641834d xendomains.confd +1877044e61a18700c8d6a998c9095d23 xendomains.initd +dcdd1de2c29e469e834a02ede4f47806 xendomains.confd 9df68ac65dc3f372f5d61183abdc83ff xen-consoles.logrotate 6a2f777c16678d84039acf670d86fff6 xenqemu.confd f9afbf39e2b5a7d9dde60ebbd249ea7d xenqemu.initd" @@ -253,8 +253,8 @@ d0b3e5f282a07878341c38f40d01041ed37623757a99d6e0a420ca64d1f4ef2a xen-fd-is-file 991bb7c9da02941556e29714bd96b26e39e57e0a5b514eadd78d9bfa3fa5a9dc xenstored.confd 93bea2eb90ea1b4628854c8141dd351bbd1fbc5959b12795447ea933ad025f01 xenconsoled.initd 2a74be03eb74f6013242a4a5d721df6cb9b959b43c405de1e32813f52d749060 xenconsoled.confd -15c380c86e1980a3d6ee13c43a419567f359a2a5f2ccc5d1cded10dadc984a9e xendomains.initd -2360b1fa1f102ac1b1a6cd0d161a94d13139dfc21d9a2227d35d557b4f04a63e xendomains.confd +a3ab3779c589e1a24a38a802afc238cb451f6a3779a7d6041b3f1517027ea3da xendomains.initd +046540c36328809fc351ad209d2b40300f91581d6d46da0caf79f57f2c212285 xendomains.confd 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19 xen-consoles.logrotate 4cfcddcade5d055422ab4543e8caa6e5c5eee7625c41880a9000b7a87c7c424e xenqemu.confd bf17808a79c57a9efc38b9f14cc87f556b2bb7ecfdec5763d9cf686255a47fce xenqemu.initd" @@ -276,8 +276,8 @@ e76816c6ad0e91dc5f81947f266da3429b20e6d976c3e8c41202c6179532eec878a3f0913921ef3a 093f7fbd43faf0a16a226486a0776bade5dc1681d281c5946a3191c32d74f9699c6bf5d0ab8de9d1195a2461165d1660788e92a3156c9b3c7054d7b2d52d7ff0 xenstored.confd 12f981b2459c65d66e67ec0b32d0d19b95a029bc54c2a79138cfe488d3524a22e51860f755abfe25ddcdaf1b27f2ded59b6e350b9d5f8791193d00e2d3673137 xenconsoled.initd 30df69cc38d0bed26bc4d6e08a2b62cbdc654d5f663009a05cb3b83b3e3dc5e206362d3fd59abbb753ceb8d6d79eaa6e15d079bb8f4f35dc74667103faf4e85d xenconsoled.confd -21f41fb6480cc1cd14796f24225da70946f2a2be13cd28465a235aa3462c6190d2d32dd696611e161e166b379931c9eb94169c87411f4079cb6003c488caf859 xendomains.initd -7c1e32d07aefbde1904ca2d98f9a415543cea7ab8e039b05e0b111e37e78c07c40b540e439b3656d5840dfd76e35e07cf1d6ddea431163d975b1ddf5ddac50d3 xendomains.confd +e3c8d3ab21468fb9ce20f47976352cd7b24fd20a3a691bf4672190b2272762ac306e27a8adc85bf14290348108b2cf0ce95418ff7fae4d6075b9da8bd056b48a xendomains.initd +a3dddcb841a22305cfe1780c4ef6cf1ee67227ca9fe6ca0d24a7cc8be2cff9e5f3fbd75c2faf85e5ce6dc3b73631879ce10e19b02afb4611c72db183e116123a xendomains.confd ab2105c75cfe01768aecd5bcbb56269d63666e8a44e42b6a83aee87df6c84ee2f9ab249171c21b2e09f8fec2cae8318f6e87d160989398a3e7dd68db8d52c426 xen-consoles.logrotate bdbe15c924071cdc2d0f23e53ba8e3f837d4b5369bfb218abd3405f9bef25d105269aaf0784baeb69c073a5786b8c82ffdfd414e86874da34293cfdc2c497928 xenqemu.confd 2341a01a000e4badd9dbfd122e7eb3e594982921a80186c0e4174744daf31114c384b42458864d9904ed1b463746efb774efa707ad48280a25ce897ef5ac9e83 xenqemu.initd" diff --git a/main/xen/xendomains.confd b/main/xen/xendomains.confd index 59985ee50b..ef95cbf22a 100644 --- a/main/xen/xendomains.confd +++ b/main/xen/xendomains.confd @@ -8,13 +8,18 @@ AUTODIR=/etc/xen/auto # each to shutdown individually PARALLEL_SHUTDOWN=yes -# When SCREEN="yes", domains in AUTODIR have their consoles connected to a -# screen session named SCREEN_NAME, with output logged to individual files -# named after each domain and written to /var/log/xen-consoles/ . These files -# are rotated (using app-admin/logrotate) every time xendomains is started. +# Whe XENDOMAINS_CONSOLE="tmux", domains in AUTODIR have their consoles +# connected to a tmux session named TMUX_NAME. +#XENDOMAINS_CONSOLE="tmux" -SCREEN="yes" -SCREEN_NAME="xen" +# When XENDOMAINS_CONSOLE="screen", domains in AUTODIR have their consoles +# connected to a screen session named SCREEN_NAME, with output logged to +# individual files named after each domain and written to +# /var/log/xen-consoles/ . These files are rotated (using app-admin/logrotate) +# every time xendomains is started. + +#XENDOMAINS_CONSOLE="screen" +#SCREEN_NAME="xen" # Number of seconds between writes to screen's logfiles. # @@ -22,11 +27,12 @@ SCREEN_NAME="xen" # impact, but higher values mean a greater chance of loosing some output # in the event of a crash. -SCREEN_LOG_INTERVAL="1" +#SCREEN_LOG_INTERVAL="1" # The location where screen stores the connection sockets -SCREENDIR=/tmp/screens/S-root +#SCREENDIR=/tmp/screens/S-root + ## Type: integer ## Default: 5000000 diff --git a/main/xen/xendomains.initd b/main/xen/xendomains.initd index dd5a924f66..dd7c07b3c4 100644 --- a/main/xen/xendomains.initd +++ b/main/xen/xendomains.initd @@ -72,6 +72,32 @@ close_screen() { fi } +set_tmux_cmd() { + : ${TMUX_NAME:=xen} + tmux_cmd="tmux -f ${TMUX_CONF:-/dev/null}" +} + +init_tmux() { + set_tmux_cmd + $tmux_cmd new-session -d -s xen -n dom0 \; \ + set-option -g set-remain-on-exit on +} + +startdom_tmux() { + $tmux_cmd new-window -t ${TMUX_NAME:-xen} -n ${1} "xl create ${2} -c" +} + +close_tmux() { + set_tmux_cmd + if ${tmux_cmd} has-session -t ${TMUX_NAME}; then + ebegin "Closing tmux session ${TMUX_NAME}" + $tmux_cmd kill-session -t ${TMUX_NAME} + eend $? + else + eend 0 + fi +} + startdom_noconsole() { xl create --quiet ${2} } @@ -82,10 +108,10 @@ set_dom_cmd() { : ${XENDOMAINS_CONSOLE:=screen} fi case "$XENDOMAINS_CONSOLE" in - screen) - initconsole=init_screen - startdom=startdom_screen - closeconsole=close_screen + screen|tmux) + initconsole=init_$XENDOMAINS_CONSOLE + startdom=startdom_$XENDOMAINS_CONSOLE + closeconsole=close_$XENDOMAINS_CONSOLE ;; *) initconsole= @@ -113,7 +139,7 @@ start() { want_usleep=1 fi ebegin " Starting domain ${name}" - $startdom ${name} ${dom} + $startdom "${name}" "${dom}" eend $? else einfo " Not starting domain ${name} - already running" |