#Open e-mail attachments, etc
mount -o bind /var/tmp "$CHROOT/var/tmp"
+ #ArchLinux suggestions
+ mount -o bind /dev/shm "$CHROOT/dev/shm"
+ mount -o bind /sys "$CHROOT/sys"
+
#Any external devices
echo ... >/dev/stderr
MNTD=`cat /proc/mounts | grep ' /media/' | awk '{print $2}'`
#Make DBus work
mount -o bind /var/run/dbus "$CHROOT/var/run/dbus"
+ mount -o bind /var/lib/dbus "$CHROOT/var/lib/dbus"
- #Make DBus work
+ #Make pulseaudio work
mount -o bind /var/run/pulse "$CHROOT/var/run/pulse"
#Speed hacks: lower the priority of processes
trap "rm -f $CHROOT/var/lock/chroot-complete ; echo -ne '\033]0;osso_xterm\007' ; exit" INT TERM EXIT
echo $IMGFILE $@ > "$CHROOT/var/lock/chroot-complete"
+#If the file is mounted on loop, use that label.
+
#Custom prompt and xterm title. Reduces confusion.
CHRLABEL=`blkid -s LABEL $IMGFILE | cut -d' ' -f2 | cut -d'=' -f2 | sed 's/"//g'`
+
+#If the file is mounted on loop, use that label.
+if [ "x$CHRLABEL" = "x" ] ; then
+ CHRLABEL=`blkid -s LABEL /dev/loop0 | cut -d' ' -f2 | cut -d'=' -f2 | sed 's/"//g'`
+fi
+
if [ "x$CHRLABEL" = "x" ] ; then
CHRLABEL=chroot
fi
+
echo -ne "\033]0;$CHRLABEL\007" >/dev/stderr
export PS1="[\u@$CHRLABEL: \w]"