Re: CVS commit: src/usr.sbin/postinstall

2012-09-22 Thread Jeff Rizzo

On 9/22/12 2:20 AM, Adrian Steinmann wrote:

Module Name:src
Committed By:   ast
Date:   Sat Sep 22 09:20:07 UTC 2012

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
Make sure that the to fix, run: ... instructions actually work cut-and-paste
By default postinstall has mode 644 so /bin/sh or similar needs to be prepended


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/usr.sbin/postinstall/postinstall

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Um, /usr/sbin/postinstall is 555 by default.  :)  I don't know that we 
need to cater to uninstalled versions in the instructions.


+j


Re: CVS commit: src/usr.sbin/postinstall

2012-09-22 Thread Adrian Steinmann
On Sat, Sep 22, 2012 at 12:33:03PM -0700, Jeff Rizzo wrote:
 On 9/22/12 2:20 AM, Adrian Steinmann wrote:
  Module Name:src
  Committed By:   ast
  Date:   Sat Sep 22 09:20:07 UTC 2012
 
  Modified Files:
  src/usr.sbin/postinstall: postinstall
 
  Log Message:
  Make sure that the to fix, run: ... instructions actually work 
  cut-and-paste
  By default postinstall has mode 644 so /bin/sh or similar needs to be 
  prepended
 
 
 Um, /usr/sbin/postinstall is 555 by default.  :)  I don't know that we 
 need to cater to uninstalled versions in the instructions.

Yes, it is installed with mode 555 in /usr/sbin/postinstall *but*
if one uses the src tarballs and then runs build.ch install=/ it
uses the /usr/src/...  postinstall (which is 755 from the CVS repo,
but 644 from the src.tgz) The maybe not-so-rare edge case when one
build from src.tgz instead of CVS thus issues faulty instructions.

That /usr/src/.../postinstall is used can be seen in /usr/src/Makefile:

_POSTINSTALL=   ${.CURDIR}/usr.sbin/postinstall/postinstall
_POSTINSTALL_ENV= \
AWK=${TOOL_AWK:Q}   \
DB=${TOOL_DB:Q} \
HOST_SH=${HOST_SH:Q}\
MAKE=${MAKE:Q}  \
PWD_MKDB=${TOOL_PWD_MKDB:Q} \
STAT=${TOOL_STAT:Q} 

postinstall-check: .PHONY
@echo=== Post installation checks ===
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDI
R}/ check; if [ $$? -gt 1 ]; then exit 1; fi
@echo

postinstall-fix: .NOTMAIN .PHONY 
@echo=== Post installation fixes ===
${_POSTINSTALL_ENV} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDI
R}/ fix
@echo===


BTW, this is the diff, it is a here-is message:

RCS file: /cvsroot/src/usr.sbin/postinstall/postinstall,v
 ${0} ${SRC_ARGLIST} -d ${DEST_DIR:-/}$m fix${items_failed}
---
 ${HOST_SH} ${0} ${SRC_ARGLIST} -d ${DEST_DIR:-/}$m fix${items_failed}

Ast