Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib Enable basic command line editing in evbarm, sparc64...



details:   https://anonhg.NetBSD.org/src/rev/b9154864885c
branches:  trunk
changeset: 373490:b9154864885c
user:      abs <abs%NetBSD.org@localhost>
date:      Sun Feb 12 19:27:20 2023 +0000

description:
Enable basic command line editing in evbarm, sparc64 and vax installer shells

(Following the pattern in amd64)

When a user selects "exit installer" or hits ^Z in sysinst, the
calling install.sh runs a shell, plus shows a message indicating
they can type "exit" to return to the installer.

Add -E to the arguments to this shell, to enable command line editing,
(primarily for arrow keys, but basic emacs sequences will also work)

With the change of all the install.sh scripts in amd64, evbarm,
i386, sparc64 and vax are identical apart from NetBSD RCD tags and
the sysctl -nx kern.consdev check (some of the latter are definitely
either wrong, or have an incorrect comment attached. Will return
to later)

diffstat:

 distrib/evbarm/installimage/install.sh      |  8 ++++----
 distrib/sparc64/cdroms/installcd/install.sh |  6 +++---
 distrib/vax/cdroms/installcd/install.sh     |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diffs (84 lines):

diff -r b8aa6777d20c -r b9154864885c distrib/evbarm/installimage/install.sh
--- a/distrib/evbarm/installimage/install.sh    Sun Feb 12 19:18:41 2023 +0000
+++ b/distrib/evbarm/installimage/install.sh    Sun Feb 12 19:27:20 2023 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh -m
-# $NetBSD: install.sh,v 1.1 2020/05/28 15:23:43 jmcneill Exp $
+# $NetBSD: install.sh,v 1.2 2023/02/12 19:27:20 abs Exp $
 #
 # -
 #  Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -87,7 +87,7 @@
 
 # run the installation or upgrade script.
 cd /
-cmd=./sysinst
+cmd=/usr/sbin/sysinst
 
 while [ -n "${cmd}" ]
 do
@@ -100,7 +100,7 @@
                        tput clear
                        echo "You have stopped sysinst, return to it by" \
                                "typing 'exit' or ^D."
-                       ${SHELL} -i
+                       ${SHELL} -i -E
                        cmd="fg"
                else
                        cmd=""
@@ -112,4 +112,4 @@
 echo "TERM=${TERM}" > ${termfile}
 echo
 echo "To return to the installer, quit this shell by typing 'exit' or ^D."
-exec ${SHELL}
+exec ${SHELL} -E
diff -r b8aa6777d20c -r b9154864885c distrib/sparc64/cdroms/installcd/install.sh
--- a/distrib/sparc64/cdroms/installcd/install.sh       Sun Feb 12 19:18:41 2023 +0000
+++ b/distrib/sparc64/cdroms/installcd/install.sh       Sun Feb 12 19:27:20 2023 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh -m
-# $NetBSD: install.sh,v 1.4 2015/05/28 09:51:31 martin Exp $
+# $NetBSD: install.sh,v 1.5 2023/02/12 19:27:20 abs Exp $
 #
 # -
 #  Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
                        tput clear
                        echo "You have stopped sysinst, return to it by" \
                                "typing 'exit' or ^D."
-                       ${SHELL} -i
+                       ${SHELL} -i -E
                        cmd="fg"
                else
                        cmd=""
@@ -112,4 +112,4 @@
 echo "TERM=${TERM}" > ${termfile}
 echo
 echo "To return to the installer, quit this shell by typing 'exit' or ^D."
-exec ${SHELL}
+exec ${SHELL} -E
diff -r b8aa6777d20c -r b9154864885c distrib/vax/cdroms/installcd/install.sh
--- a/distrib/vax/cdroms/installcd/install.sh   Sun Feb 12 19:18:41 2023 +0000
+++ b/distrib/vax/cdroms/installcd/install.sh   Sun Feb 12 19:27:20 2023 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh -m
-# $NetBSD: install.sh,v 1.2 2015/05/28 09:51:31 martin Exp $
+# $NetBSD: install.sh,v 1.3 2023/02/12 19:27:20 abs Exp $
 #
 # -
 #  Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
                        tput clear
                        echo "You have stopped sysinst, return to it by" \
                                "typing 'exit' or ^D."
-                       ${SHELL} -i
+                       ${SHELL} -i -E
                        cmd="fg"
                else
                        cmd=""
@@ -112,4 +112,4 @@
 echo "TERM=${TERM}" > ${termfile}
 echo
 echo "To return to the installer, quit this shell by typing 'exit' or ^D."
-exec ${SHELL}
+exec ${SHELL} -E



Home | Main Index | Thread Index | Old Index