Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 378926 Details for
Bug 513308
vanilla 3.15 - calling syscall(1000) triggers a BUG in kernel's auditd
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
chr_uml.sh
chr_uml.sh (text/plain), 1.98 KB, created by
Toralf Förster
on 2014-06-15 08:58:46 UTC
(
hide
)
Description:
chr_uml.sh
Filename:
MIME Type:
Creator:
Toralf Förster
Created:
2014-06-15 08:58:46 UTC
Size:
1.98 KB
patch
obsolete
>#!/bin/bash ># > ># Toralf Förster ># Hamburg ># Germany > ># set -x > >function mountall { > # is this UML image already in use ? > # > mount -o loop $ROOTFS $MNT || return 1 > > mount -t proc none $MNT/proc > mount -o bind /dev $MNT/dev > mount -o bind /dev/pts $MNT/dev/pts > mount -t tmpfs none $MNT/dev/shm > mount -o bind /etc/portage/patches $MNT/etc/portage/patches > mount -o bind /sys $MNT/sys > mount -o bind /usr/portage $MNT/usr/portage > mount -o bind /usr/local/portage $MNT/usr/local/portage > mount -o bind /var/lib/distfiles $MNT/var/lib/distfiles > mount -t tmpfs none $MNT/var/tmp/portage > > return 0 >} > > >function umountall { > umount $MNT/var/tmp/portage > umount $MNT/var/lib/distfiles > umount $MNT/usr/local/portage > umount $MNT/usr/portage > umount $MNT/sys > umount $MNT/etc/portage/patches > umount $MNT/dev/shm > umount $MNT/dev/pts > umount $MNT/dev > umount $MNT/proc > umount $MNT >} > > >############################################################################# ># >CMD="" >ROOTFS="" >JUST_UMOUNT=0 > >while getopts c:r:U opt >do > case $opt in > c) CMD=$OPTARG > ;; > > r) ROOTFS=$OPTARG > ;; > > > U) JUST_UMOUNT=1 > ;; > > *) echo "Usage : $(basename $0) -r <root fs> [-c <cmd>] [-U]" > exit 1 > ;; > esac >done > >if [[ -z "$(file $ROOTFS 2>/dev/null | grep 'UUID=')" || ! -w $ROOTFS ]]; then > echo " not a valid root-fs: $ROOTFS or not write-able" > exit 1 >fi > ># we assume different file names for the images ># >NAME=$(basename $ROOTFS) > >if [[ "$(whoami)" != "root" ]]; then > echo " You must be root !" > exit 2 >fi > >MNT=/mnt/$NAME >if [[ ! -d $MNT ]]; then > mkdir $MNT || exit 4 >fi > >if [[ $JUST_UMOUNT = 1 ]]; then > umountall > exit 5 >fi > >mountpoint -q $MNT >if [[ $? -eq 0 ]]; then > echo " mount point $MNT is already in use !" > exit 6 >fi > >lsof -w $ROOTFS 2>/dev/null | grep -q ^linux >if [[ $? -eq 0 ]]; then > echo " uml is already running at $ROOTFS !" > exit 7 >fi > >mountall || exit 8 > >if [[ -n "$CMD" ]]; then > chroot $MNT /bin/bash -c "su - root -c '$CMD'" >else > chroot $MNT /bin/bash -c "su -" >fi >RC=$? > >umountall > >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 513308
: 378926 |
379130