aboutsummaryrefslogtreecommitdiff
path: root/shellrc.d
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-03-26 18:53:57 +0200
committerKarel Kočí <cynerd@email.cz>2018-03-26 18:53:57 +0200
commit882de74fd55641fdde34782bb3d509b86015f484 (patch)
tree59790f0d5c47eb3945a55896e57383c17a1d7e8b /shellrc.d
parent1383742de87557e72694bca990a4e20d399bab9a (diff)
downloadshellrc-882de74fd55641fdde34782bb3d509b86015f484.tar.gz
shellrc-882de74fd55641fdde34782bb3d509b86015f484.tar.bz2
shellrc-882de74fd55641fdde34782bb3d509b86015f484.zip
Add simple function for chrooting with bashv0.3
Diffstat (limited to 'shellrc.d')
-rw-r--r--shellrc.d/common5
1 files changed, 5 insertions, 0 deletions
diff --git a/shellrc.d/common b/shellrc.d/common
index ae8216e..d52767b 100644
--- a/shellrc.d/common
+++ b/shellrc.d/common
@@ -83,3 +83,8 @@ ssh-clear() {
rm -rf ~/.cache/ssh
mkdir -p ~/.cache/ssh
}
+
+# Chroot to bash to given path
+chroot-bash() {
+ sudo chroot "$1" /bin/bash
+}