NetBSD-Bugs archive

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

Re: bin/54741: postinstall(8) fix no longer update /etc/rc.subr etc.



I am worried that SRC_DIR does not work if not $SOURCEMODE, this is why
I have not committed it...

christos

> On Dec 7, 2019, at 3:40 PM, Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost> wrote:
> 
> The following reply was made to PR bin/54741; it has been noted by GNATS.
> 
> From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: tsutsui%ceres.dti.ne.jp@localhost
> Subject: Re: bin/54741: postinstall(8) fix no longer update /etc/rc.subr etc.
> Date: Sun, 8 Dec 2019 05:38:34 +0900
> 
> The following a bit ugly patch works around.
> (this also includes a  fix of a rest part of PR/54730)
> 
> ---
> Index: usr.sbin/postinstall/postinstall.in
> ===================================================================
> RCS file: /cvsroot/src/usr.sbin/postinstall/postinstall.in,v
> retrieving revision 1.10
> diff -u -p -d -r1.10 postinstall.in
> --- usr.sbin/postinstall/postinstall.in	4 Dec 2019 04:45:42 -0000	1.10
> +++ usr.sbin/postinstall/postinstall.in	7 Dec 2019 20:33:50 -0000
> @@ -1415,6 +1415,12 @@ do_pwd_mkdb()
>  #	rc
>  #
> 
> +rc_644_files="
> +rc
> +rc.shutdown
> +rc.subr
> +"
> +
>  rc_obsolete_vars="
>  amd amd_master
>  btcontrol btcontrol_devices
> @@ -1465,11 +1471,18 @@ select_set_files()
>  # $3: setname
>  select_obsolete_files()
>  {
> +	local obsolete_dir
> +	if [ $3 = "etc" ] ;then
> +		obsolete_dir=${SRC_DIR}/var/db/obsolete
> +	else
> +		obsolete_dir=${DEST_DIR}/var/db/obsolete
> +	fi
> +
>  	if $SOURCEMODE; then
>  		${SED} -n -e "/obsolete/s@\.$1$2[[:space:]].*@\1@p" \
>  		    ${SRC_DIR}/distrib/sets/lists/$3/mi
>  	else
> -		${SED} -n -e "s@\.$1$2\$@\1@p" "${DEST_DIR}/var/db/obsolete/$3"
> +		${SED} -n -e "s@\.$1$2\$@\1@p" "${obsolete_dir}/$3"
>  	fi
>  }
> 
> @@ -1498,8 +1511,8 @@ do_rc()
>  	local rc_external_files="blacklist nsd unbound"
> 
>  	# rc* files in /etc/
> -	local rc_444_files="$(select_set_files /etc/rc \
> -	    "/etc/\(rc[^[:space:]/]*\)" ${etcsets})"
> +	#local rc_644_files="$(select_set_files /etc/rc \
> +	#    "/etc/\(rc[^[:space:]/]*\)" ${etcsets})"
> 
>  	# no-obsolete rc files in /etc/rc.d
>  	local rc_555_files="$(select_set_files /etc/rc.d/ \
> 
> ---
> Izumi Tsutsui
> 

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index