Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 29444 Details for
Bug 48069
UML init start script, to automatically start and stop UMLs, with ssh dummy user
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
starts and stops one UML
umlsquanto (text/plain), 1.21 KB, created by
Thomas Lassmann
on 2004-04-16 14:17:30 UTC
(
hide
)
Description:
starts and stops one UML
Filename:
MIME Type:
Creator:
Thomas Lassmann
Created:
2004-04-16 14:17:30 UTC
Size:
1.21 KB
patch
obsolete
>#!/sbin/runscript ># Distributed under the terms of the GNU General Public License v2 ># $Header: /etc/init.d/umlsquanto, v 1.1 2004/04/05 22:05:00 squanto > >UMLUID=10000 >UMLHOME=/home/squanto/uml/ >UMLUID=0 >WAIT=10 >UMLNAME=${1##*/} > >depend() { > need umlstart >} > >start() { > einfo "starting ${UMLNAME}" > > 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 > > eend $? >} > >stop() { > einfo "stoping ${UMLNAME}" > > su goblin -c "ssh root@192.168.0.1${UMLUID} 'shutdown -h now'" > echo "/var/run/${UMLNAME}.pid" > if [ -f /var/run/${UMLNAME}.pid ]; then > echo "pid exists" > for ((i = 1; i <= WAIT; i++)); do > sleep 3 > echo "wait for ${UMLNAME} to shutdown!" > if [ ! -e /proc/$(cat /var/run/${UMLNAME}.pid) ]; then > rm -f /var/run/${UMLNAME}.pid > echo "${UMLNAME} shutdown ok" > WAIT=0 > fi > done > [ -f /var/run/${UMLNAME}.pid ] && echo "process still existing -> killing process" && kill -9 $(cat /var/run/${UMLNAME}.pid) > fi > eend 0 > >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 48069
:
29443
| 29444