Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 2014 19:48:46 -0700
From:      <dteske@FreeBSD.org>
To:        "'Mateusz Guzik'" <mjguzik@gmail.com>, "'Bryan Drewery'" <bdrewery@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, 'Devin Teske' <dteske@FreeBSD.org>, src-committers@freebsd.org
Subject:   RE: svn commit: r268641 - head/usr.sbin/service
Message-ID:  <014901cfa0a0$773c3640$65b4a2c0$@FreeBSD.org>
In-Reply-To: <20140715191553.GA31990@dft-labs.eu>
References:  <201407150218.s6F2Itj8044531@svn.freebsd.org> <53C56BE9.9050304@FreeBSD.org> <20140715191553.GA31990@dft-labs.eu>

next in thread | previous in thread | raw e-mail | index | archive | help


> -----Original Message-----
> From: owner-src-committers@freebsd.org [mailto:owner-src-
> committers@freebsd.org] On Behalf Of Mateusz Guzik
> Sent: Tuesday, July 15, 2014 12:16 PM
> To: Bryan Drewery
> Cc: Devin Teske; src-committers@freebsd.org; svn-src-all@freebsd.org; =
svn-
> src-head@freebsd.org
> Subject: Re: svn commit: r268641 - head/usr.sbin/service
>=20
> On Tue, Jul 15, 2014 at 12:59:05PM -0500, Bryan Drewery wrote:
> > On 7/14/2014 9:18 PM, Devin Teske wrote:
> > > Author: dteske
> > > Date: Tue Jul 15 02:18:55 2014
> > > New Revision: 268641
> > > URL: http://svnweb.freebsd.org/changeset/base/268641
> > >
> > > Log:
> > >   Fix an issue with service(8) where utilities such as screen(1) =
and tmux(1)
> > >   would behave differently when utilizing rc-script was invoked =
manually
> vs.
> > >   service(8). The issue being that these utilities require the =
TERM environ
> > >   variable to be set and service(8) was not passing it down.
> > >
> > >   Reported by:	Michael Dexter <editor@callfortesting.org>
> > >   PR:		bin/191869
> > >   Reviewed by:	allanjude
> > >   MFC after:	3 days
> > >   X-MFC-to:	stable/10, stable/9
> > >
> > > Modified:
> > >   head/usr.sbin/service/service.sh
> > >
> > > Modified: head/usr.sbin/service/service.sh
> > >
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > --- head/usr.sbin/service/service.sh	Tue Jul 15 01:03:29 2014
> 	(r268640)
> > > +++ head/usr.sbin/service/service.sh	Tue Jul 15 02:18:55 2014
> 	(r268641)
> > > @@ -139,7 +139,7 @@ cd /
> > >  for dir in /etc/rc.d $local_startup; do
> > >  	if [ -x "$dir/$script" ]; then
> > >  		[ -n "$VERBOSE" ] && echo "$script is located in $dir"
> > > -		exec env -i HOME=3D/ PATH=3D/sbin:/bin:/usr/sbin:/usr/bin
> $dir/$script $*
> > > +		exec env -i HOME=3D/ PATH=3D/sbin:/bin:/usr/sbin:/usr/bin
> TERM=3D"$TERM" $dir/$script $*
> > >  	fi
> > >  done
> > >
> > >
> >
> > Hm, I'm not sure about this. The "behaves differently" is exactly =
the
> > reason for service(8). It runs with a clean environment such as the =
boot
> > does. Running an rc script without service(8) will give wrong =
behavior
> > in many scripts that do not match boot-time behavior.
> >
>=20
> Indeed, the whole point is to NOT inherit anything from calling =
process.
>=20

If that were the point, then we have an issue. Because as it stands,
service(8) does _not_ accurately provide the same environment as boot.

Take the following boot script:

dteske@scribe9.vicor.com ~ $ cat /etc/rc.d/foo
#!/bin/sh
# PROVIDE: foo
set > /tmp/termtest
. /etc/rc.subr
name=3Dfoo
rcvar=3Dfoo_enable
command=3D"/usr/local/bin/tmux"
foo_flags=3D"new -s foo ls"
load_rc_config $name
run_rc_command "$1"

Now reboot to find the following in /tmp/termtest:

dteske@scribe9.vicor.com ~ $ cat /tmp/termtest
HOME=3D/
ID=3D/usr/bin/id
IDCMD=3D'if [ -x /usr/bin/id ]; then /usr/bin/id -un; fi'
IFS=3D'
'
JID=3D0
OPTIND=3D1
PATH=3D/sbin:/bin:/usr/sbin:/usr/bin
PPID=3D1
PS1=3D'# '
PS2=3D'> '
PS4=3D'+ '
PS=3D'/bin/ps -ww'
PWD=3D/
RC_PID=3D19
SYSCTL=3D/sbin/sysctl
SYSCTL_N=3D'/sbin/sysctl -n'
SYSCTL_W=3D/sbin/sysctl
_arg=3Dfaststart
_boot=3Dfaststart
_file=3D/etc/rc.d/foo
_rc_conf_loaded=3Dtrue
_rc_elem=3D/etc/rc.d/foo
_rc_elem_done=3D' /etc/rc.d/sysctl /etc/rc.d/hostid /etc/rc.d/zvol =
/etc/rc.d/dumpon /etc/rc.d/ddb /etc/rc.d/initrandom /etc/rc.d/geli =
/etc/rc.d/gbde /etc/rc.d/encswap /etc/rc.d/ccd /etc/rc.d/swap1 =
/etc/rc.d/fsck /etc/rc.d/root /etc/rc.d/mdconfig /etc/rc.d/hostid_save =
/etc/rc.d/mountcritlocal /etc/rc.d/zfs /etc/rc.d/var /etc/rc.d/cleanvar =
/etc/rc.d/FILESYSTEMS '
_rc_namevarlist=3D'program chroot chdir flags fib nice user group =
groups'
_rc_subr_loaded=3D:
accept_sourceroute=3DNO
accounting_enable=3DNO
allscreens_flags=3D''
allscreens_kbdflags=3D''
always_force_depends=3DNO
amd_enable=3DNO
amd_flags=3D'-a /.amd_mnt -l syslog /host /etc/amd.map /net =
/etc/amd.map'
amd_map_program=3DNO
amd_program=3D/usr/sbin/amd
apm_enable=3DNO
apmd_enable=3DNO
apmd_flags=3D''
arpproxy_all=3DNO
atm_arps=3D''
atm_enable=3DNO
atm_pvcs=3D''
auditd_enable=3DNO
auditd_flags=3D''
auditd_program=3D/usr/sbin/auditd
auditdistd_enable=3DNO
auditdistd_flags=3D''
auditdistd_program=3D/usr/sbin/auditdistd
autoboot=3Dyes
background_dhclient=3DNO
background_fsck=3DYES
background_fsck_delay=3D60
bhyve_enable=3DNO
bhyve_profiles=3D'virt1 virt2'
blanktime=3D300
bootparamd_enable=3DNO
bootparamd_flags=3D''
bsdextended_script=3D/etc/rc.bsdextended
bsnmpd_enable=3DNO
bsnmpd_flags=3D''
bthidd_config=3D/etc/bluetooth/bthidd.conf
bthidd_enable=3DNO
bthidd_hids=3D/var/db/bthidd.hids
check_quotas=3DYES
chkprintcap_enable=3DNO
chkprintcap_flags=3D-d
cleanvar_enable=3DYES
clear_tmp_X=3DYES
clear_tmp_enable=3DNO
cloned_interfaces=3D''
crashinfo_enable=3DYES
crashinfo_program=3D/usr/sbin/crashinfo
cron_dst=3DYES
cron_enable=3DYES
cron_flags=3D''
cron_program=3D/usr/sbin/cron
cursor=3DNO
ddb_config=3D/etc/ddb.conf
ddb_enable=3DNO
defaultroute_carrier_delay=3D5
defaultroute_delay=3D30
defaultrouter=3D172.16.169.2
devd_enable=3DYES
devd_flags=3D''
devfs_load_rulesets=3DNO
devfs_rulesets=3D'/etc/defaults/devfs.rules /etc/devfs.rules'
devfs_set_rulesets=3D''
devfs_system_ruleset=3D''
dhclient_flags=3D''
dhclient_program=3D/sbin/dhclient
dir=3D/usr/local/etc/rc.d
dlv=3D0
dmesg_enable=3DYES
dummynet_enable=3DNO
dumpdev=3DNO
dumpdir=3D/var/crash
early_late_divider=3DFILESYSTEMS
economy_cpu_freq=3DNONE
economy_cx_lowest=3DHIGH
entropy_dir=3D/var/db/entropy
entropy_file=3D/entropy
entropy_save_num=3D8
entropy_save_sz=3D2048
extra_netfs_types=3DNO
fec_interfaces=3D''
file=3D/usr/local/etc/rc.d/svnserve
files=3D'/etc/rc.d/sysctl
/etc/rc.d/hostid
/etc/rc.d/zvol
/etc/rc.d/dumpon
/etc/rc.d/ddb
/etc/rc.d/initrandom
/etc/rc.d/geli
/etc/rc.d/gbde
/etc/rc.d/encswap
/etc/rc.d/ccd
/etc/rc.d/swap1
/etc/rc.d/fsck
/etc/rc.d/root
/etc/rc.d/mdconfig
/etc/rc.d/hostid_save
/etc/rc.d/mountcritlocal
/etc/rc.d/zfs
/etc/rc.d/var
/etc/rc.d/cleanvar
/etc/rc.d/FILESYSTEMS
/etc/rc.d/kldxref
/etc/rc.d/kld
/etc/rc.d/addswap
/etc/rc.d/random
/etc/rc.d/adjkerntz
/etc/rc.d/atm1
/etc/rc.d/hostname
/etc/rc.d/ip6addrctl
/etc/rc.d/netoptions
/etc/rc.d/sppp
/etc/rc.d/ipfilter
/etc/rc.d/ipnat
/etc/rc.d/ipfs
/etc/rc.d/serial
/etc/rc.d/netif
/etc/rc.d/devd
/etc/rc.d/ipsec
/etc/rc.d/atm2
/etc/rc.d/pfsync
/etc/rc.d/pflog
/etc/rc.d/pf
/etc/rc.d/stf
/etc/rc.d/ppp
/etc/rc.d/faith
/etc/rc.d/routing
/etc/rc.d/mroute6d
/etc/rc.d/nsswitch
/etc/rc.d/rtsold
/etc/rc.d/static_ndp
/etc/rc.d/static_arp
/etc/rc.d/bridge
/etc/rc.d/resolv
/etc/rc.d/route6d
/etc/rc.d/mrouted
/etc/rc.d/routed
/etc/rc.d/defaultroute
/etc/rc.d/ipfw
/etc/rc.d/NETWORKING
/etc/rc.d/netwait
/etc/rc.d/mountcritremote
/etc/rc.d/accounting
/etc/rc.d/ldconfig
/etc/rc.d/devfs
/etc/rc.d/ipmon
/etc/rc.d/mdconfig2
/etc/rc.d/newsyslog
/etc/rc.d/syslogd
/etc/rc.d/watchdogd
/etc/rc.d/savecore
/etc/rc.d/archdep
/etc/rc.d/abi
/etc/rc.d/SERVERS
/etc/rc.d/named
/etc/rc.d/ntpdate
/etc/rc.d/rpcbind
/etc/rc.d/nfsclient
/etc/rc.d/nisdomain
/etc/rc.d/ypserv
/etc/rc.d/ypbind
/etc/rc.d/ypset
/etc/rc.d/amd
/etc/rc.d/atm3
/etc/rc.d/auditd
/etc/rc.d/auditdistd
/etc/rc.d/tmp
/etc/rc.d/cleartmp
/etc/rc.d/dmesg
/etc/rc.d/hastd
/etc/rc.d/ipxrouted
/etc/rc.d/kerberos
/etc/rc.d/kadmind
/etc/rc.d/keyserv
/etc/rc.d/kpasswdd
/etc/rc.d/nfsuserd
/etc/rc.d/gssd
/etc/rc.d/quota
/etc/rc.d/mountd
/etc/rc.d/nfsd
/etc/rc.d/statd
/etc/rc.d/lockd
/etc/rc.d/pppoed
/etc/rc.d/pwcheck
/etc/rc.d/virecover
/usr/local/etc/rc.d/stunnel
/etc/rc.d/DAEMON
/usr/local/etc/rc.d/svnserve
/etc/rc.d/apm
/etc/rc.d/apmd
/etc/rc.d/bootparams
/etc/rc.d/hcsecd
/etc/rc.d/bthidd
/etc/rc.d/local
/etc/rc.d/lpd
/etc/rc.d/motd
/etc/rc.d/mountlate
/etc/rc.d/nscd
/etc/rc.d/ntpd
/etc/rc.d/powerd
/etc/rc.d/rarpd
/etc/rc.d/rctl
/etc/rc.d/sdpd
/etc/rc.d/rfcomm_pppd_server
/etc/rc.d/rtadvd
/etc/rc.d/rwho
/etc/rc.d/timed
/etc/rc.d/ugidfw
/etc/rc.d/yppasswdd
/etc/rc.d/LOGIN
/usr/local/etc/rc.d/rsyncd
/usr/local/etc/rc.d/p4d
/usr/local/etc/rc.d/mcwatchdog
/usr/local/etc/rc.d/git_daemon
/usr/local/etc/rc.d/dbus
/etc/rc.d/ypxfrd
/etc/rc.d/ypupdated
/etc/rc.d/ubthidhci
/etc/rc.d/syscons
/etc/rc.d/sshd
/etc/rc.d/sendmail
/etc/rc.d/cron
/etc/rc.d/jail
/etc/rc.d/localpkg
/etc/rc.d/securelevel
/etc/rc.d/othermta
/etc/rc.d/nfscbd
/etc/rc.d/msgs
/etc/rc.d/moused
/etc/rc.d/mixer
/etc/rc.d/inetd
/etc/rc.d/hostapd
/etc/rc.d/gptboot
/etc/rc.d/geli2
/etc/rc.d/ftpd
/etc/rc.d/ftp-proxy
/etc/rc.d/foo
/etc/rc.d/bsnmpd
/etc/rc.d/bgfsck'
firewall_allowservices=3D''
firewall_client_net=3D192.0.2.0/24
firewall_coscripts=3D''
firewall_enable=3DNO
firewall_flags=3D''
firewall_logdeny=3DNO
firewall_logging=3DNO
firewall_myservices=3D''
firewall_nat_enable=3DNO
firewall_nat_flags=3D''
firewall_nat_interface=3D''
firewall_nologports=3D'135-139,445 1026,1027 1433,1434'
firewall_quiet=3DNO
firewall_script=3D/etc/rc.firewall
firewall_simple_iif=3Ded1
firewall_simple_inet=3D192.0.2.16/28
firewall_simple_oif=3Ded0
firewall_simple_onet=3D192.0.2.0/28
firewall_trusted=3D''
firewall_type=3DUNKNOWN
font8x14=3DNO
font8x16=3DNO
font8x8=3DNO
foo_enable=3DYES
forward_sourceroute=3DNO
fsck_y_enable=3DNO
fsck_y_flags=3D''
ftpd_enable=3DNO
ftpd_flags=3D''
ftpd_program=3D/usr/libexec/ftpd
ftpproxy_enable=3DNO
ftpproxy_flags=3D''
gateway_enable=3DNO
gbde_attach_attempts=3D3
gbde_autoattach_all=3DNO
gbde_devices=3DNO
gbde_lockdir=3D/etc
geli_autodetach=3DYES
geli_default_flags=3D''
geli_devices=3D''
geli_swap_flags=3D'-e aes -l 256 -s 4096 -d'
geli_tries=3D''
gif_interfaces=3D''
gptboot_enable=3DYES
gssd_enable=3DNO
gssd_flags=3D''
harvest_ethernet=3DYES
harvest_interrupt=3DYES
harvest_p_to_p=3DYES
hastd_enable=3DNO
hastd_flags=3D''
hastd_program=3D/sbin/hastd
hcsecd_config=3D/etc/bluetooth/hcsecd.conf
hcsecd_enable=3DNO
hostapd_enable=3DNO
hostid_enable=3DYES
hostid_file=3D/etc/hostid
hostname=3Dscribe9.vicor.com
ibcs2_enable=3DNO
ibcs2_loaders=3Dcoff
icmp_bmcastecho=3DNO
icmp_drop_redirect=3DNO
icmp_log_redirect=3DNO
ifconfig_em0=3DDHCP
ike_enable=3DNO
ike_flags=3D''
ike_program=3D/usr/local/sbin/isakmpd
inetd_enable=3DNO
inetd_flags=3D'-wW -C 60'
inetd_program=3D/usr/sbin/inetd
ip6addrctl_enable=3DYES
ip6addrctl_policy=3DAUTO
ip6addrctl_verbose=3DNO
ip_portrange_first=3DNO
ip_portrange_last=3DNO
ipfilter_enable=3DNO
ipfilter_flags=3D''
ipfilter_program=3D/sbin/ipf
ipfilter_rules=3D/etc/ipf.rules
ipfs_enable=3DNO
ipfs_flags=3D''
ipfs_program=3D/sbin/ipfs
ipmon_enable=3DNO
ipmon_flags=3D-Ds
ipmon_program=3D/sbin/ipmon
ipnat_enable=3DNO
ipnat_flags=3D''
ipnat_program=3D/sbin/ipnat
ipnat_rules=3D/etc/ipnat.rules
ipsec_enable=3DNO
ipsec_file=3D/etc/ipsec.conf
ipv6_activate_all_interfaces=3DNO
ipv6_cpe_wanif=3DNO
ipv6_default_interface=3DNO
ipv6_defaultrouter=3DNO
ipv6_faith_prefix=3DNO
ipv6_gateway_enable=3DNO
ipv6_ipfilter_rules=3D/etc/ipf6.rules
ipv6_ipv4mapping=3DNO
ipv6_network_interfaces=3Dauto
ipv6_privacy=3DNO
ipv6_static_routes=3D''
ipxgateway_enable=3DNO
ipxrouted_enable=3DNO
ipxrouted_flags=3D''
jail_enable=3DNO
jail_list=3D''
jail_parallel_start=3DNO
jail_set_hostname_allow=3DYES
jail_socket_unixiproute_only=3DYES
jail_sysvipc_allow=3DNO
kadmind5_server=3D/usr/libexec/kadmind
kadmind5_server_enable=3DNO
kerberos5_server=3D/usr/libexec/kdc
kerberos5_server_enable=3DNO
kerberos5_server_flags=3D--detach
kern_securelevel=3D-1
kern_securelevel_enable=3DNO
keybell=3DNO
keyboard=3D''
keychange=3DNO
keymap=3DNO
keyrate=3Dfast
keyserv_enable=3DNO
keyserv_flags=3D''
kldxref_clobber=3DNO
kldxref_enable=3DNO
kldxref_module_path=3D''
kpasswdd_server=3D/usr/libexec/kpasswdd
kpasswdd_server_enable=3DNO
ldconfig32_paths=3D/usr/lib32
ldconfig_insecure=3DNO
ldconfig_local32_dirs=3D/usr/local/libdata/ldconfig32
ldconfig_local_dirs=3D/usr/local/libdata/ldconfig
ldconfig_paths=3D'/usr/lib/compat /usr/local/lib =
/usr/local/lib/compat/pkg'
ldconfig_paths_aout=3D'/usr/lib/compat/aout /usr/local/lib/aout'
linux_enable=3DNO
local_rc=3D' /usr/local/etc/rc.d/dbus /usr/local/etc/rc.d/git_daemon =
/usr/local/etc/rc.d/mcwatchdog /usr/local/etc/rc.d/p4d =
/usr/local/etc/rc.d/rsyncd /usr/local/etc/rc.d/stunnel =
/usr/local/etc/rc.d/svnserve'
local_startup=3D/usr/local/etc/rc.d
log_in_vain=3D0
lpd_enable=3DNO
lpd_flags=3D''
lpd_program=3D/usr/sbin/lpd
mcwatchdog_enable=3DYES
mixer_enable=3DYES
mountd_enable=3DYES
mountd_flags=3D-r
mousechar_start=3DNO
moused_enable=3DYES
moused_flags=3D''
moused_nondefault_enable=3DYES
moused_port=3D/dev/psm0
moused_type=3Dauto
mroute6d_enable=3DNO
mroute6d_flags=3D''
mroute6d_program=3D/usr/local/sbin/pim6dd
mrouted_enable=3DNO
mrouted_flags=3D''
mrouted_program=3D/usr/local/sbin/mrouted
mta_start_script=3D/etc/rc.sendmail
named_auto_forward=3DNO
named_auto_forward_only=3DNO
named_chroot_autoupdate=3DYES
named_chrootdir=3D/var/named
named_conf=3D/etc/namedb/named.conf
named_enable=3DNO
named_program=3D/usr/sbin/named
named_symlink_enable=3DYES
named_uid=3Dbind
named_wait=3DNO
named_wait_host=3Dlocalhost
natd_enable=3DNO
natd_flags=3D''
natd_interface=3D''
natd_program=3D/sbin/natd
natm_static_routes=3D''
netfs_types=3D'nfs:NFS oldnfs:OLDNFS smbfs:SMB portalfs:PORTAL =
nwfs:NWFS'
netwait_enable=3DYES
netwait_if_timeout=3D30
netwait_timeout=3D60
network_interfaces=3Dauto
newsyslog_enable=3DYES
newsyslog_flags=3D-CN
nfs_access_cache=3D60
nfs_bufpackets=3D''
nfs_client_enable=3DNO
nfs_reserved_port_only=3DNO
nfs_server_enable=3DYES
nfs_server_flags=3D'-u -t -n 4'
nfscbd_enable=3DNO
nfscbd_flags=3D''
nfsuserd_enable=3DNO
nfsuserd_flags=3D''
nfsv4_server_enable=3DNO
nis_client_enable=3DNO
nis_client_flags=3D''
nis_server_enable=3DNO
nis_server_flags=3D''
nis_yppasswdd_enable=3DNO
nis_yppasswdd_flags=3D''
nis_ypset_enable=3DNO
nis_ypset_flags=3D''
nis_ypxfrd_enable=3DNO
nis_ypxfrd_flags=3D''
nisdomainname=3DNO
nscd_enable=3DNO
ntpd_config=3D/etc/ntp.conf
ntpd_enable=3DNO
ntpd_flags=3D'-p /var/run/ntpd.pid -f /var/db/ntpd.drift'
ntpd_program=3D/usr/sbin/ntpd
ntpd_sync_on_start=3DNO
ntpdate_config=3D/etc/ntp.conf
ntpdate_enable=3DYES
ntpdate_flags=3D-b
ntpdate_hosts=3Dtime-nw.nist.gov
ntpdate_program=3D/usr/sbin/ntpdate
oldnfs_server_enable=3DNO
opensm_enable=3DNO
performance_cpu_freq=3DNONE
performance_cx_lowest=3DHIGH
pf_enable=3DNO
pf_flags=3D''
pf_program=3D/sbin/pfctl
pf_rules=3D/etc/pf.conf
pflog_enable=3DNO
pflog_flags=3D''
pflog_logfile=3D/var/log/pflog
pflog_program=3D/sbin/pflogd
pfsync_enable=3DNO
pfsync_ifconfig=3D''
pfsync_syncdev=3D''
pfsync_syncpeer=3D''
populate_var=3DAUTO
powerd_enable=3DNO
powerd_flags=3D''
ppp_enable=3DNO
ppp_mode=3Dauto
ppp_nat=3DYES
ppp_profile=3Dpapchap
ppp_program=3D/usr/sbin/ppp
ppp_user=3Droot
pppoed_enable=3DNO
pppoed_flags=3D'-P /var/run/pppoed.pid'
pppoed_interface=3Dfxp0
pppoed_provider=3D'*'
quota_enable=3DNO
quotacheck_flags=3D-a
quotaoff_flags=3D-a
quotaon_flags=3D-a
rarpd_enable=3DNO
rarpd_flags=3D-a
rc_conf_files=3D'/etc/rc.conf /etc/rc.conf.local'
rc_debug=3DNO
rc_fast=3Dyes
rc_info=3DNO
rc_startmsgs=3DYES
rcshutdown_timeout=3D90
rfcomm_pppd_server_enable=3DNO
rfcomm_pppd_server_one_channel=3D1
rfcomm_pppd_server_profile=3D'one two'
rfcomm_pppd_server_two_channel=3D3
root_rw_mount=3DYES
route6d_enable=3DNO
route6d_flags=3D''
route6d_program=3D/usr/sbin/route6d
routed_enable=3DNO
routed_flags=3D-q
routed_program=3D/sbin/routed
rpc_lockd_enable=3DYES
rpc_lockd_flags=3D''
rpc_statd_enable=3DYES
rpc_statd_flags=3D''
rpc_ypupdated_enable=3DNO
rpcbind_enable=3DNO
rpcbind_flags=3D''
rpcbind_program=3D/usr/sbin/rpcbind
rtadvd_enable=3DNO
rtadvd_interfaces=3D''
rtsol_flags=3D''
rtsold_enable=3DNO
rtsold_flags=3D-a
rwhod_enable=3DNO
rwhod_flags=3D''
savecore_flags=3D''
saver=3Dbeastie
script_name_sep=3D' '
scrnmap=3DNO
sdpd_control=3D/var/run/sdp
sdpd_enable=3DNO
sdpd_groupname=3Dnobody
sdpd_username=3Dnobody
sendmail_enable=3DNO
sendmail_flags=3D'-L sm-mta -bd -q30m'
sendmail_msp_queue_enable=3DYES
sendmail_msp_queue_flags=3D'-L sm-msp-queue -Ac -q30m'
sendmail_outbound_enable=3DYES
sendmail_outbound_flags=3D'-L sm-queue -q30m'
sendmail_pidfile=3D/var/run/sendmail.pid
sendmail_procname=3D/usr/sbin/sendmail
sendmail_rebuild_aliases=3DNO
sendmail_submit_enable=3DYES
sendmail_submit_flags=3D'-L sm-mta -bd -q30m =
-ODaemonPortOptions=3DAddr=3Dlocalhost'
skip=3D'-s nostart'
source_rc_confs_defined=3Dyes
sppp_interfaces=3D''
sshd_enable=3DYES
sshd_flags=3D'-g 300'
sshd_program=3D/usr/sbin/sshd
static_arp_pairs=3D''
static_ndp_pairs=3D''
static_routes=3D''
stf_interface_ipv4addr=3D''
stf_interface_ipv4plen=3D0
stf_interface_ipv6_ifid=3D0:0:0:1
stf_interface_ipv6_slaid=3D0000
svr4_enable=3DNO
swapfile=3DNO
synchronous_dhclient=3DNO
syslogd_enable=3DYES
syslogd_flags=3D-s
syslogd_program=3D/usr/sbin/syslogd
sysvipc_enable=3DNO
tcp_drop_synfin=3DNO
tcp_extensions=3DYES
tcp_keepalive=3DYES
timed_enable=3DNO
timed_flags=3D''
tmpmfs=3DAUTO
tmpmfs_flags=3D-S
tmpsize=3D20m
ubthidhci_enable=3DNO
ugidfw_enable=3DNO
update_motd=3DYES
varmfs=3DAUTO
varmfs_flags=3D-S
varsize=3D32m
virecover_enable=3DYES
watchdogd_enable=3DNO
watchdogd_flags=3D''
weak_mountd_authentication=3DNO
wpa_supplicant_conf_file=3D/etc/wpa_supplicant.conf
wpa_supplicant_flags=3D-s
wpa_supplicant_program=3D/usr/sbin/wpa_supplicant
zfs_enable=3DYES

Compare that with the following:

dteske@scribe9.vicor.com ~ $ sr service foo start
dteske@scribe9.vicor.com ~ $ cat /tmp/termtest
HOME=3D/
IFS=3D'
'
OPTIND=3D1
PATH=3D/sbin:/bin:/usr/sbin:/usr/bin
PPID=3D1285
PS1=3D'# '
PS2=3D'> '
PS4=3D'+ '
PWD=3D/

Looks to me like some things are being inherited.
Notably, it would appear that the rc.d scripts are
run within the parent namespace which has had
source_rc_confs() called (I'm leaving alone for the
moment that this indicates that each rc-script is
being less than efficient by re-sourcing rc.subr).

Given the above (that we are farther from a "clean
environment" than one might expect), is it really
that big of a deal to expose $TERM? If so, what are
the serious issues that could arise?

I personally cannot think of any shortcomings or
fallout from adding $TERM to be exposed.
--=20
Devin




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?014901cfa0a0$773c3640$65b4a2c0$>