summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2002-08-29 01:53:38 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2002-08-29 01:53:38 +0000
commitff62bd41289b22416099ce070194346803e21f54 (patch)
tree7f68a1292b91490024dc7bfab469851f1ef65be8 /distrib/miniroot
parent3654abde9eb6af39377967187bee6b00e7fe9cfb (diff)
Add a new verb to list2sh.awk, 'REMOVE'. This allows the easy
disabling of '(U)pgrade' in architectures by adding REMOVE upgrade to the end of the 'list' file for that architecture. Add code to dot.profile to check for the presence of the upgrade script before offering to (U)pgrade. Use the new verb to disable upgrades for sparc. ok deraadt@.
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/dot.profile6
-rw-r--r--distrib/miniroot/list2sh.awk7
2 files changed, 10 insertions, 3 deletions
diff --git a/distrib/miniroot/dot.profile b/distrib/miniroot/dot.profile
index 4c104838de2..96eda49291c 100644
--- a/distrib/miniroot/dot.profile
+++ b/distrib/miniroot/dot.profile
@@ -1,4 +1,4 @@
-# $OpenBSD: dot.profile,v 1.2 2002/06/09 05:53:54 todd Exp $
+# $OpenBSD: dot.profile,v 1.3 2002/08/29 01:53:37 krw Exp $
# $NetBSD: dot.profile,v 1.1 1995/12/18 22:54:43 pk Exp $
#
# Copyright (c) 1995 Jason R. Thorpe
@@ -55,7 +55,9 @@ if [ "X${DONEPROFILE}" = "X" ]; then
# Installing or upgrading?
_forceloop=""
while [ "X$_forceloop" = X"" ]; do
- echo -n '(I)nstall, (U)pgrade or (S)hell? '
+ echo -n '(I)nstall'
+ [ -f upgrade ] && echo -n ', (U)pgrade'
+ echo -n ' or (S)hell? '
read _forceloop
case "$_forceloop" in
i*|I*) /install
diff --git a/distrib/miniroot/list2sh.awk b/distrib/miniroot/list2sh.awk
index f39bd3250d0..d2f9e1f7358 100644
--- a/distrib/miniroot/list2sh.awk
+++ b/distrib/miniroot/list2sh.awk
@@ -1,4 +1,4 @@
-# $OpenBSD: list2sh.awk,v 1.10 2002/05/24 13:19:48 markus Exp $
+# $OpenBSD: list2sh.awk,v 1.11 2002/08/29 01:53:37 krw Exp $
# $NetBSD: list2sh.awk,v 1.2 1996/05/04 15:45:31 pk Exp $
BEGIN {
@@ -15,6 +15,11 @@ $1 == "COPY" {
printf("cp %s ${TARGDIR}/%s\n", $2, $3);
next;
}
+$1 == "REMOVE" {
+ printf("echo '%s'\n", $0);
+ printf("rm -f ${TARGDIR}/%s\n", $2);
+ next;
+}
$1 == "STRIP" {
printf("echo '%s'\n", $0);
printf("test -f ${TARGDIR}/%s && rm -fr ${TARGDIR}/%s\n", $3, $3);