From 1f33f6e66f4c8249fd369339e82ac3249cf5234d Mon Sep 17 00:00:00 2001 From: apb Date: Sun, 11 Mar 2007 16:08:11 +0000 Subject: [PATCH] Test whether pax works; if not, fall back to mknod. This is intended for use on install media that might not have pax. --- etc/MAKEDEV.tmpl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/etc/MAKEDEV.tmpl b/etc/MAKEDEV.tmpl index 722b281d63e7..54695782e2e3 100644 --- a/etc/MAKEDEV.tmpl +++ b/etc/MAKEDEV.tmpl @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: MAKEDEV.tmpl,v 1.82 2007/03/11 15:52:30 apb Exp $ +# $NetBSD: MAKEDEV.tmpl,v 1.83 2007/03/11 16:08:11 apb Exp $ # # Copyright (c) 2003,2007 The NetBSD Foundation, Inc. # All rights reserved. @@ -371,7 +371,12 @@ setup() opts="${opts} -m ${OPTARG}" ;; p) TOOL_PAX="${OPTARG}" - do_pax=true + if ( echo "" | "${TOOL_PAX}" -w -M ); then + do_pax=true + else + warn "Ignored -p option:" \ + "${TOOL_PAX} is missing or broken" + fi ;; s) do_specfile=true opts="${opts} -s"