summaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/editor.patch
blob: bec421e5fa3bbbdfae3ec1733f58e809995b0393 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
commit ca0e10950a5db60121ac741f0bad28af9bb504b9
Author: Natanael Copa <ncopa@alpinelinux.org>
Date:   Tue Dec 28 13:27:55 2010 +0000

    setup-interfaces: use vi as default editor
    
    since nano is not shipped with mini iso.

diff --git a/setup-interfaces.in b/setup-interfaces.in
index aad042d..b96ee58 100755
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -141,12 +141,11 @@ while [ "$answer" != "yes" ] && [ "$answer" != "no" ] ; do
 done
 
 if [ "$answer" = "yes" ]; then
-	[ -z "$EDITOR" ] && EDITOR=nano
-	case $EDITOR in
+	case "$EDITOR" in
 		nano)	pkg_inst nano;;
 		vim)	pkg_inst vim;;
 	esac
-	$EDITOR interfaces
+	${EDITOR:-vi} interfaces
 fi
 
 mkdir -p $ROOT/etc/network