Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 48069

Summary: UML init start script, to automatically start and stop UMLs, with ssh dummy user
Product: Gentoo Linux Reporter: Thomas Lassmann <t.lassmann>
Component: Current packagesAssignee: Daniel Black (RETIRED) <dragonheart>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: hythloday, m.debruijne, tantive
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 55749    
Bug Blocks:    
Attachments: setup environment an tap devices for the UMLs
starts and stops one UML

Description Thomas Lassmann 2004-04-16 14:13:44 UTC
I did write a little init script for gentoo. Works great. There I can startand stop my UMLs with init. To stop the UMLs I need a gohst user, this user can shutdown the UML over ssh without a password. 

Hope this is the right repository. Hope this helps.

Reproducible: Always
Steps to Reproduce:
Comment 1 Thomas Lassmann 2004-04-16 14:16:22 UTC
Created attachment 29443 [details]
setup environment an tap devices for the UMLs
Comment 2 Thomas Lassmann 2004-04-16 14:17:30 UTC
Created attachment 29444 [details]
starts and stops one UML
Comment 3 Thomas Lassmann 2004-04-16 14:21:46 UTC
The script is based on my situation:
I have three UMLs in a DMZ. (umlsquanto, umlarize105, umlxvaderx)
They are connected over tap devices to the host.
Comment 4 Daniel Black (RETIRED) gentoo-dev 2004-04-24 18:56:02 UTC
How do you propose that we package and make this available to gentoo users?
Comment 5 Daniel Black (RETIRED) gentoo-dev 2004-04-25 18:22:03 UTC
Added reference to this bug on gentoo-server@g.o email list. Was a discussion already there so I'm just trying to get some more feedback here.
Comment 6 Thomas Lassmann 2004-04-26 01:45:32 UTC
I am not sure how, becauase this two init scripts are bugie suggestion, which work fine for my UML and my special setup. I wannted to give people, who are using UML and want to start it with init, a little help to write their own script. I got some good feedbacks in th uml-user mailinglist.

I could maybe imagine adding it to the UML-howto. And to fit it to the UML-howto network setup. Or just posting it in the gentoo forum with some explanations. Or just collecting some versions of init scripts for UMLs somewhere.
Comment 7 Thomas Lassmann 2004-04-26 01:52:50 UTC
Comment on attachment 29443 [details]
setup environment an tap devices for the UMLs

added to end of start:
  # for all
  iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  echo 1 > /proc/sys/net/ipv4/ip_forward

added to end of stop
  # for all
  iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  echo 0 > /proc/sys/net/ipv4/ip_forward
Comment 8 Thomas Lassmann 2004-04-26 01:56:28 UTC
Comment on attachment 29444 [details]
starts and stops one UML

>UMLUID=10000
removed this variable 

>	start-stop-daemon --start --quiet --chuid ${UMLUID} --background --pidfile /var/run/${UMLNAME}.pid --make-pidfile --exec /usr/local/bin/linux -- ubd0=${UMLHOME}root_fs ubd1=${UMLHOME}swap_fs ubd2=${UMLHOME}home_squanto eth0=tuntap,tap${UMLUID},fe:fd:0:0:0:${UMLUID},192.168.0.25${UMLUID} >/dev/null 2>&1
fixed this line to start as the correct user:
	start-stop-daemon --start --quiet --chuid 1000${UMLUID} --background
--pidfile /var/run/${UMLNAME}.pid --make-pidfile --exec /usr/local/bin/linux --
ubd0=${UMLHOME}root_fs ubd1=${UMLHOME}swap_fs ubd2=${UMLHOME}home_squanto
eth0=tuntap,tap${UMLUID},fe:fd:0:0:0:${UMLUID},192.168.0.25${UMLUID} >/dev/null
2>&1

stoping the UML should be changed to stop it with the UMLs mconsole
Comment 9 Daniel Black (RETIRED) gentoo-dev 2004-08-15 13:52:24 UTC
When Glep 15 - Gentoo Script Repository gets off its feet this is a good candiate for it.

http://www.gentoo.org/proj/en/glep/glep-0015.html
Comment 10 Daniel Black (RETIRED) gentoo-dev 2004-10-09 17:58:33 UTC
James,

Is this a canditate for the script repository?
Comment 11 Daniel Black (RETIRED) gentoo-dev 2008-04-01 04:12:49 UTC
I never worked out a clean way of using them. Its here for reference and I hope it helps someone out Thomas.