diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-03-14 19:19:12 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-03-14 19:19:12 +0100 |
commit | 418f9d9d490819ac8b5fe24e37bf83d1d16b8521 (patch) | |
tree | ec4d5ffad02069ddabaa8e0495607a7e03345c7b /.zshrc | |
parent | 89e312be31e1107036e23f4a269d6ad6b5427c36 (diff) | |
download | dotfiles-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-- | .zshrc | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -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 ' |