install nano + set it as default EDITOR/VISUAL

This commit is contained in:
d4nn13 committed 2026-04-19 19:20:24 +02:00
1 parent 4c9df1941d
commit 33d713f95b
1 file changed
+7
+7
View File
@@ -26,6 +26,7 @@ log() { printf '[install] %s\n' "$*"; }
log "installing packages" log "installing packages"
apk add --no-cache \ apk add --no-cache \
bash \ bash \
nano \
wireguard-tools \ wireguard-tools \
wireguard-tools-openrc \ wireguard-tools-openrc \
iptables \ iptables \
@@ -35,6 +36,12 @@ apk add --no-cache \
conntrack-tools \ conntrack-tools \
openrc openrc
# Default editor → nano (for visudo, crontab -e, etc.)
if ! grep -q '^export EDITOR=nano' /etc/profile 2>/dev/null; then
echo 'export EDITOR=nano' >> /etc/profile
echo 'export VISUAL=nano' >> /etc/profile
fi
# --- /dev/net/tun sanity ---------------------------------------------------- # --- /dev/net/tun sanity ----------------------------------------------------
if [[ ! -e /dev/net/tun ]]; then if [[ ! -e /dev/net/tun ]]; then
cat >&2 <<'EOF' cat >&2 <<'EOF'