Skip to content

Commit

Permalink
[#26] quick vimrc.local against frustration
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonic-builder OSSO committed Nov 20, 2024
1 parent adb5ee6 commit afd63b9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
12 changes: 12 additions & 0 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,18 @@ set /files/etc/ssh/sshd_config/LogLevel VERBOSE
save
quit
EOF
# XXXWJD: quick fix; ideally we want this in a custom-build-thing
# + we want this _inside_ every docker instance as well.
sudo tee $FILESYSTEM_ROOT/etc/vim/vimrc.local >/dev/null <<'EOF'
" Instead of auto-sourcing this afterwards, source it now.
source \$VIMRUNTIME/defaults.vim
let g:skip_defaults_vim = 1
" Now we undo the "wrong" settings.
set mouse=
set noincsearch
set nosi
EOF
# Configure sshd to listen for v4 and v6 connections
sudo sed -i 's/^#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' $FILESYSTEM_ROOT/etc/ssh/sshd_config
sudo sed -i 's/^#ListenAddress ::/ListenAddress ::/' $FILESYSTEM_ROOT/etc/ssh/sshd_config
Expand Down
12 changes: 11 additions & 1 deletion sonic-slave-bookworm/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,17 @@ RUN eatmydata apt-get install -y xsltproc
RUN eatmydata apt-get -y build-dep isc-dhcp

# Install vim
RUN eatmydata apt-get install -y vim
RUN eatmydata apt-get install -y vim && \
# XXXWJD: vimrc.local
printf '%s\n' >/etc/vim/vimrc.local \
'" Instead of auto-sourcing this afterwards, source it now.' \
'source $VIMRUNTIME/defaults.vim' \
'let g:skip_defaults_vim = 1' \
'' \
'" Now we undo the "wrong" settings.' \
'set mouse=' \
'set noincsearch' \
'set nosi'

# Install rsyslog
RUN eatmydata apt-get install -y rsyslog
Expand Down
12 changes: 11 additions & 1 deletion sonic-slave-bullseye/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,17 @@ RUN eatmydata apt-get install -y xsltproc
RUN eatmydata apt-get -y build-dep isc-dhcp

# Install vim
RUN eatmydata apt-get install -y vim
RUN eatmydata apt-get install -y vim && \
# XXXWJD: vimrc.local
printf '%s\n' >/etc/vim/vimrc.local \
'" Instead of auto-sourcing this afterwards, source it now.' \
'source $VIMRUNTIME/defaults.vim' \
'let g:skip_defaults_vim = 1' \
'' \
'" Now we undo the "wrong" settings.' \
'set mouse=' \
'set noincsearch' \
'set nosi'

# Install rsyslog
RUN eatmydata apt-get install -y rsyslog
Expand Down

0 comments on commit afd63b9

Please sign in to comment.