summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-03-14 19:19:12 +0100
committerFlorian Pritz <bluewind@xssn.at>2010-03-14 19:19:12 +0100
commit418f9d9d490819ac8b5fe24e37bf83d1d16b8521 (patch)
treeec4d5ffad02069ddabaa8e0495607a7e03345c7b /.zshrc
parent89e312be31e1107036e23f4a269d6ad6b5427c36 (diff)
downloaddotfiles-418f9d9d490819ac8b5fe24e37bf83d1d16b8521.tar.gz
dotfiles-418f9d9d490819ac8b5fe24e37bf83d1d16b8521.tar.xz
zshrc: fix shell{32,64}
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc23
1 files changed, 21 insertions, 2 deletions
diff --git a/.zshrc b/.zshrc
index 5d76a2b..d40ac48 100644
--- a/.zshrc
+++ b/.zshrc
@@ -406,6 +406,25 @@ short_ii() {
echo
}
+shell32() {
+ chrootdir="$HOME/misc/chroots/arch32"
+ __chrootshell
+}
+
+shell64() {
+ chrootdir="$HOME/misc/chroots/arch64"
+ __chrootshell
+}
+
+__chrootshell() {
+ [ -d "$chrootdir/rw" ] || sudo mkdir "$chrootdir/rw"
+ [ -d "$chrootdir/union-shell" ] || sudo mkdir "$chrootdir/union-shell"
+ sudo modprobe -q aufs
+ sudo mount -t aufs none -o "dirs=$chrootdir/rw=rw:$chrootdir/root=ro" "$chrootdir/union-shell"
+ sudo linux32 chroot "$chrootdir/union-shell" /bin/bash
+ sudo umount "$chrootdir/union-shell"
+}
+
# }}}
# History {{{
export HISTFILE=~/.zsh/histfile
@@ -500,8 +519,8 @@ alias install32='linux32 sudo makechrootpkg -r ~/misc/chroots/arch32 -I'
alias install64='linux64 sudo makechrootpkg -r ~/misc/chroots/arch64 -I'
alias clean32='sudo rm -r ~/misc/chroots/arch32/rw'
alias clean64='sudo rm -r ~/misc/chroots/arch64/rw'
-alias shell32='linux32 sudo mkarchroot -r bash ~/misc/chroots/arch32/root'
-alias shell64='linux64 sudo mkarchroot -r bash ~/misc/chroots/arch64/root'
+alias rshell32='linux32 sudo mkarchroot -r bash ~/misc/chroots/arch32/root'
+alias rshell64='linux64 sudo mkarchroot -r bash ~/misc/chroots/arch64/root'
#alias sudo="sudo " #Sudo wont recognize aliases without this
alias s='sudo '