From a257c143b10a7ff42a4e4cc6610b85698669fcbb Mon Sep 17 00:00:00 2001 From: tdro Date: Fri, 11 Mar 2022 19:49:26 -0500 Subject: .config/lxc: Add build files --- .bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.bashrc') 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 } -- cgit v1.2.3