Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 331340 Details for
Bug 439574
sys-apps/coreutils: tests set low VM limit (ulimit) which crashes due to higher memory usage w/sandbox active
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
chroot into an uml image
chr_uml.sh (text/plain), 1.86 KB, created by
Toralf Förster
on 2012-12-03 19:12:46 UTC
(
hide
)
Description:
chroot into an uml image
Filename:
MIME Type:
Creator:
Toralf Förster
Created:
2012-12-03 19:12:46 UTC
Size:
1.86 KB
patch
obsolete
>#!/bin/sh ># > ># Toralf Förster ># Hamburg ># Germany > ># set -x > >while getopts r: opt >do > case $opt in > r) UMLROOTFS=$OPTARG > ;; > > *) echo "Usage : $(basename $0) -r <root fs>" > exit 1 > ;; > esac >done > > >############################################################################# ># >if [[ ! -f $UMLROOTFS || ! -r $UMLROOTFS || ! -w $UMLROOTFS ]]; then > echo "no r/w able root-fs $UMLROOTFS" > exit 1 >fi > ># we assume different file names for the images ># >NAME=$(basename $UMLROOTFS) > >if [[ "$(whoami)" != "root" ]]; then > echo " You must be root !" > exit 2 >fi > ># load module if neccessary and sleep a sec ># to give it time for initialization ># >if [[ -z "$(lsmod | grep "^loop ")" ]]; then > modprobe loop && sleep 2 || exit 3 >fi > >MNTPNT=/mnt/ramdisk/$NAME >if [[ ! -d $MNTPNT ]]; then > mkdir $MNTPNT || exit 1 >fi > ># is this UML image already in use ? ># >mountpoint -q $MNTPNT >if [[ $? -eq 0 ]]; then > echo "$MNTPNT is already mounted" > exit 5 >fi > ># temp dir for emerging packages, the UML image itself doesn't have too much free disk space ># >TMPPORTAGE=/mnt/ramdisk/uml_portage_$NAME >if [[ ! -d $TMPPORTAGE ]]; then > mkdir $TMPPORTAGE > sudo chown portage:portage $TMPPORTAGE >fi > > >############################################################################# ># >mount -o loop $UMLROOTFS $MNTPNT >mount -t proc none $MNTPNT/proc >mount -o bind /dev $MNTPNT/dev >mount -o bind /dev/pts $MNTPNT/dev/pts >mount -o bind /sys $MNTPNT/sys >mount -o bind /usr/portage $MNTPNT/usr/portage >mount -o bind /usr/local/portage $MNTPNT/usr/local/portage >mount -o bind $TMPPORTAGE $MNTPNT/var/tmp/portage > >chroot $MNTPNT /bin/bash -c "su -" >RC=$? > >umount $MNTPNT/var/tmp/portage >umount $MNTPNT/usr/local/portage >umount $MNTPNT/usr/portage >umount $MNTPNT/sys >umount $MNTPNT/dev/pts >umount $MNTPNT/dev >umount $MNTPNT/proc >umount $MNTPNT > >rmdir $TMPPORTAGE/._unmerge_/ 2>/dev/null >rmdir $TMPPORTAGE >rmdir $MNTPNT > >exit $RC >
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 439574
:
327346
| 331340 |
331418