aboutsummaryrefslogtreecommitdiff
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
parent1383742de87557e72694bca990a4e20d399bab9a (diff)
downloadshellrc-6651a02dd145ea599270f01a4a4dd88bda8d6f98.tar.gz
shellrc-6651a02dd145ea599270f01a4a4dd88bda8d6f98.tar.bz2
shellrc-6651a02dd145ea599270f01a4a4dd88bda8d6f98.zip
Add simple function for chrooting with bashv0.3
-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
+}