[Frugalware-darcs] frugalware-current: uml_utilities-20040406-3-i686

VMiklos vmiklos at frugalware.org
Mon Jun 11 14:14:34 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=frugalware-current;a=darcs_commitdiff;h=20070611121017-e2957-cc1ebe8a16c40da75a31900244f4a8b10bfe67c9.gz;

[uml_utilities-20040406-3-i686
VMiklos <vmiklos at frugalware.org>**20070611121017
 added an init script so that virtual machines can be easily started on boot
] {
hunk ./source/apps-extra/uml_utilities/FrugalBuild 6
-pkgrel=2
+pkgrel=3
hunk ./source/apps-extra/uml_utilities/FrugalBuild 10
+backup=(etc/sysconfig/uml)
hunk ./source/apps-extra/uml_utilities/FrugalBuild 14
-source=(http://dl.sf.net/sourceforge/user-mode-linux/${pkgname}_$pkgver.tar.bz2)
-sha1sums=('6a2eb9df9fd37ee367af71c11a27e9ee14733517')
+source=(http://dl.sf.net/sourceforge/user-mode-linux/${pkgname}_$pkgver.tar.bz2 \
+	rc.uml uml)
+sha1sums=('6a2eb9df9fd37ee367af71c11a27e9ee14733517' \
+          '579a60ab33e1c6115846294b41f20ebb0071c143' \
+          '7ffb16393f625c3ad59588d20ba72392f04707cd')
hunk ./source/apps-extra/uml_utilities/FrugalBuild 25
+	Frcd2 uml
+	Ffile /etc/sysconfig/uml
addfile ./source/apps-extra/uml_utilities/rc.uml
hunk ./source/apps-extra/uml_utilities/rc.uml 1
+#!/bin/bash
+
+# (c) 2007 Miklos Vajna <vmiklos at frugalware.org>
+# rc.uml for Frugalware
+# distributed under GPL License
+
+# chkconfig: 2345 44 56
+# description: Manage UML machines
+
+source /lib/initscripts/functions
+TEXTDOMAINDIR=/lib/initscripts/functions
+TEXTDOMAIN=uml
+
+actions=(restart start status stop)
+daemon=$"User Mode Linux machines"
+
+pid="cat /var/run/uml0.pid 2> /dev/null"
+
+rc_start()
+{
+	start_msg
+	if [ -n "`type -p linux`" -a "$(eval ${pid})" == "" ]; then
+		source /etc/sysconfig/uml
+		num=0
+		for i in "${machines[@]}"
+		do
+			linux $i &> /var/log/uml$num.log &
+			echo $! > /var/run/uml$num.pid
+			num=$(($num+1))
+		done
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_stop()
+{
+	stop_msg
+	if [ "$(eval ${pid})" != "" ] ; then
+		for i in /var/run/uml*.pid
+		do
+			id=$(grep '\.uml/' /var/log/$(basename $i .pid).log |sed -n 's|.*/\(.*\)/mconsole|\1|;$ p')
+			uml_mconsole $id cad >/dev/null
+			rm -f $i
+		done
+		ok $?
+	else
+		ok 999
+	fi
+}
+
+rc_exec $1
addfile ./source/apps-extra/uml_utilities/uml
hunk ./source/apps-extra/uml_utilities/uml 1
+#
+# /etc/sysconfig/mdadm
+#
+# confiugation file for user-mode-linux
+#
+
+# machines to start/stop
+machines=('ubd0=/mnt/target/root_fs eth0=tuntap,,,192.168.0.254 mem=128MB con0=null,fd:1 con=null')
+
+# vim: ft=sh
}


More information about the Frugalware-darcs mailing list