serial console in interactive mode, ssh aliases

This commit is contained in:
2024-01-25 13:55:17 +01:00
parent c69f75d08a
commit aa422b9bec
3 changed files with 27 additions and 1 deletions

View File

@@ -41,3 +41,19 @@ sm() {
tmux new-window -n serial:$(basename ${@:-1}) sudo picocom --logfile $SERIAL_LOGS/serial-$(basename ${@:-1})-$(ls $SERIAL_LOGS/serial-*.log 2> /dev/null | wc -l).log --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@ tmux new-window -n serial:$(basename ${@:-1}) sudo picocom --logfile $SERIAL_LOGS/serial-$(basename ${@:-1})-$(ls $SERIAL_LOGS/serial-*.log 2> /dev/null | wc -l).log --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@
} }
smi() {
tmux rename-window "serial:$(basename ${@:-1})"
sudo picocom --logfile $SERIAL_LOGS/serial-$(basename ${@:-1})-$(ls $SERIAL_LOGS/serial-*.log 2> /dev/null | wc -l).log --baud 921600 --parity n --databits 8 --stopbits 1 --flow n --escape z $@
}
mgnt() {
echo $1
sshpass -p administrator ssh administrator@$1
}
sumgnt() {
#echo root@$1
sshpass -p ekitool ssh root@$1 "${@:2}"
}
alias shmgnt="sshpass -p ekitool ssh"

View File

@@ -45,6 +45,9 @@ if [ -n "$WSLENV" ] ; then
# Enable entr workaround for incomplete inotify support on WSL # Enable entr workaround for incomplete inotify support on WSL
export ENTR_INOTIFY_WORKAROUND=1 export ENTR_INOTIFY_WORKAROUND=1
# Re-init serial
reinit() (unset _SERIAL_INIT; reload)
# Connect serial console port if found # Connect serial console port if found
if [ -z "$_SERIAL_INIT" ] ; then if [ -z "$_SERIAL_INIT" ] ; then
source "$HOME/.usbipd" source "$HOME/.usbipd"
@@ -92,4 +95,10 @@ if [ -z "$TMUX" ] ; then
tmux new-session -A -s $HRNX_TMUX_SESSIONNAME tmux new-session -A -s $HRNX_TMUX_SESSIONNAME
fi fi
# Env for 'mgnt toolbox' (rbsh, rbcli, etc)
export RBIP="192.168.13.203"
export RBLOG="administrator"
export RBPASS="administrator"
export RBROOTPASS="ekitool"

View File

@@ -15,6 +15,7 @@ bind l select-pane -R \; display-panes
bind h select-pane -L \; display-panes bind h select-pane -L \; display-panes
bind C-l last-pane \; display-panes bind C-l last-pane \; display-panes
bind L last-pane \; display-panes bind L last-pane \; display-panes
bind s swap-pane
# Window navigation # Window navigation
bind Tab last-window bind Tab last-window
@@ -32,7 +33,7 @@ bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-selection-no-clear
bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word bind -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word
bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line bind -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line
bind -T copy-mode-vi Escape send -X cancel bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi f send -X search-backward
# Window actions # Window actions