aboutsummaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authortdro <tdro@users.noreply.github.com>2022-03-11 19:49:26 -0500
committertdro <tdro@users.noreply.github.com>2022-03-11 19:49:26 -0500
commita257c143b10a7ff42a4e4cc6610b85698669fcbb (patch)
tree3c13fdd7d6b908b7eb291a7388300c5d87e00c01 /.bashrc
parent5bffa79831a25b59ee6d9424e9ac5c3380b62d06 (diff)
downloaddotfiles-a257c143b10a7ff42a4e4cc6610b85698669fcbb.tar.gz
dotfiles-a257c143b10a7ff42a4e4cc6610b85698669fcbb.tar.bz2
dotfiles-a257c143b10a7ff42a4e4cc6610b85698669fcbb.zip
.config/lxc: Add build files
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index 13654f0..66a7d8c 100644
--- a/.bashrc
+++ b/.bashrc
@@ -110,7 +110,7 @@ nix-which() { readlink "$(type -P "$1")"; }
# lxc helpers
lxc-copy() { A=$1 && B=$2 && shift 2 && $(type -P lxc-copy) --allowrunning --name "$A" -N "$B" "$@"; }
-lxc-shell() { lxc-attach "$1" -- /bin/sh -c 'export HOME="/root" && . /etc/profile && /bin/sh'; }
+lxc-shell() { lxc-start "$1" > /dev/null 2>&1 && lxc-attach "$1" -- /bin/sh -c 'export HOME="/root" && . /etc/profile && /bin/sh'; }
lxc-restart() { $(type -P lxc-stop) --kill --name "$1"; $(type -P lxc-start) -n "$1"; }
lxc-start() { for container in "$@"; do $(type -P lxc-start) --name "$container"; done }
lxc-stop() { for container in "$@"; do $(type -P lxc-stop) --kill --name "$container"; done }