Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- xhost +
- CHROOT="/home/ff/.stretch"
- [ `whoami` == "root" ] || (echo Must be root && exit 2)
- [ -n "$(mount | grep $CHROOT/proc)" ] || mount -t proc /proc $CHROOT/proc
- [ -n "$(mount | grep $CHROOT/sys)" ] || mount -R /sys $CHROOT/sys
- [ -n "$(mount | grep $CHROOT/dev)" ] || mount -R /dev $CHROOT/dev
- [ -n "$(mount | grep $CHROOT/tmp)" ] || mount -R /tmp $CHROOT/tmp
- [ -n "$(mount | grep $CHROOT /run)" ] || mount --bind /run $CHROOT/run
- [ -n "$(mount | grep $CHROOT/run/udev)" ] || mount -R /run/udev $CHROOT/run/udev
- [ -n "$(mount | grep $CHROOT/root)" ] || mount -R /home/ff/.steam $CHROOT/root/.steam
- #[ -d "$CHROOT/var/run/dbus" ] ||
- mount -o bind /var/run/dbus $CHROOT/run/dbus
- #[ -f $CHROOT/var/run/dbus/system_bus_socket ] || chroot $CHROOT dbus-launch
- COMMAND="bash -i"
- case $1 in
- "X") COMMAND="startx";;
- "con") COMMAND="bash -i";;
- "steam") COMMAND="bash -c /usr/local/bin/bashrc.steam";;
- esac
- chroot $CHROOT $COMMAND
- umount -l $CHROOT/run/dbus
- umount -l $CHROOT/root/.steam
- umount -l $CHROOT/run/udev
- umount -l $CHROOT/tmp
- umount -l $CHROOT/dev
- umount -l $CHROOT/sys
- umount -l $CHROOT/proc
- root@rtl8192:/home/ff# stretch
- access control disabled, clients can connect from any host
- /usr/bin/stretch: 5: [: root: unexpected operator
- Must be root
- grep: /run: Это каталог
- root@rtl8192:/# service bumblebeed start
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
- Running in chroot, ignoring request.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement