https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191869
Bug ID: 191869 Summary: tmux(1) refuses to start via service(8) Product: Base System Version: 9.2-RELEASE Hardware: i386 OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: dte...@freebsd.org If building an rc script (either old-style or new) that utilizes tmux, said rc-script functions as-desired if executed directly (e.g., typing "/etc/rc.d/foo start") but does not function as-desired -- producing the following error -- if instead executed via service(8) (/usr/sbin/service): open terminal failed: terminal does not support clear The issue is with line 142 of usr.sbin/service/service.sh (revision 267493) which reads as follows: exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin $dir/$script $* The issue here is the purposeful use of the "-i" flag to env(1) which tells /usr/bin/env to (quote) "execute the utility with only those environment variables specified by name=value options. The environment inherited by env is ignored completely." Specifically, it is the absence of the TERM environment variable that causes tmux to produce the above error ("open terminal failed: terminal does not support clear"). The solution is to add TERM to the list of variables provided to (in this case) the child tmux. Globally adding TERM to the list of variables that are passed to service(8) child-scripts seems harmless enough (warranted even; for pedantic properness). -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"