Commit Graph

64 Commits

Author SHA1 Message Date
nia 47e93d95e8 As with normal users, include /usr/games in the default PATH of root 2022-12-25 23:58:50 +00:00
riastradh d5d881d693 /root: Install .cshrc and .profile links with the same mode.
Previously we would:

1. Install /root/.cshrc and /root/.profile with mode FILESMODE=644 as
   requested in src/etc/root/Makefile and as echoed in
   /etc/mtree/special.

2. Create hard links at /.cshrc and /.profile through CONFIGLINKS.

3. Because LINKSMODE was unset and defaults to NOBINMODE=444, change
   the mode to 444.

This scenario is confusing, and mtree objects to it, which is bad for
warning fatigue in a security-relevant mechanism.  (There are also
several other files mtree objects to out of the box -- we should fix
those too.)

With this change we install the links with the same mode as the
original files, in agreement with the mtree.  The files, .cshrc and
.profile, are intended to be editable configuration files, so 644
makes sense while 444 makes no sense and gets in the way of editors
like vi.

Discussed on tech-userlevel:
https://mail-index.netbsd.org/tech-userlevel/2022/08/29/msg013498.html

XXX pullup-8
XXX pullup-9
2022-08-30 13:14:48 +00:00
kre 15e7028037 Cleanup the "hup" function - quote properly, and test for the pid
file existing (with something in it) before simply using it, so the
error message can be controlled, rather than just sh's cannot open file msg.
2022-07-21 07:53:28 +00:00
kre d8eb9e45f2 Get rid of the (insulting)
We recommend that you create a non-root account...
message from single user mode shell startups.
2022-07-21 07:51:12 +00:00
kre 6c36afa3ab If /rescue is at the head of $PATH (which is how it starts out in /rescue/sh
unless changed by something - and has been since NetBSD 3) don't blindly
simply change it to a PATH that doesn't have /rescue in it at all.

This doesn't solve the "/rescue/tar execs /usr/bin/gzip" problem completely,
as if PATH is in the environment when /rescue/sh is started, that one will
override the shell's built in PATH, but this is better than nothing.
2022-07-09 09:43:51 +00:00
nia 452f8ae6e8 uname -p, pointed out by various 2020-08-24 12:46:57 +00:00
nia 9fa431f295 Use sysctl -n hw.machine_arch so this works on e.g. aarch64
Ues HTTPS
2020-08-15 14:47:28 +00:00
jdolecek 8c4f01a8e3 fix incomplete gnu/ deletion - PR misc/55444 by Jim Bernard 2020-07-02 11:08:55 +00:00
mrg ce3aa71a56 remove no longer existing gnu/* from cdpath. 2019-12-04 08:21:50 +00:00
snj 017fa37fab /usr/X11R6 has been empty on most NetBSD installations since 2008,
and the last few straggling ports dumped it in 2015.  It's time to
prune references to /usr/X11R6 from our config files.
2018-03-01 06:12:09 +00:00
jmcneill f0053e9555 Update example PKG_PATH entry to use the CDN frontend, use uname -p instead
of uname -m for processor subdirectory, and derive the OS release from
uname -r.
2017-12-07 18:26:51 +00:00
mlelstv 9da4c9a5be tset was useful for fixed terminals and rarely changing configurations.
But for current software terminal emulators and varying network
logins it's just confusing.

No longer run tset when logging in.

ok @martin
2016-03-08 09:51:15 +00:00
riz fd7966dae0 Freshen up the commented-out suggested PKG_PATH a bit. 2014-11-30 23:43:30 +00:00
uwe 00ed5c3931 We don't need to include <bsd.prog.mk> to install a few config files
just <bsd.files.mk> and <bsd.links.mk> is enough.

Noticed because <bsd.prog.mk> sets LINKSMODE to BINMODE and that does
the wrong thing at least for unprivileged builds.
2012-11-17 23:08:38 +00:00
he 7a324bfe36 Point first to 6.0 packages, then to packages for 5.1 or 5.0.
The latter have reduced usefullness in -current or netbsd-6 until
we have a compat50 package.
2012-03-11 17:28:47 +00:00
he 50de5b0f94 Can't use Bourne shell syntax here... (Even in comments, for PKG_PATH.) 2012-03-11 17:23:55 +00:00
erh 2d7c053867 There is no .../5.99 path to use for PKG_PATH, so change it to 5.1 instead.
Also refer the reader to pkg_install.conf as an alternative.
2011-06-21 05:31:29 +00:00
christos 4f848eee4b `` -> $() 2010-12-27 03:38:52 +00:00
roy 89d790bdbe Move the emergancy terminfo database from /root to /rescue. 2010-02-05 09:44:23 +00:00
roy 70f7be699b Install a minimal .terminfo and .terminfo.db in /root.
This allows terminfo to be used when /usr is not available.
Fixes PR misc/6879.
2010-02-04 21:01:16 +00:00
tsutsui d73f433280 netbsd.org -> NetBSD.org for URLs. 2009-08-26 11:15:25 +00:00
ad 35f9ffd80d Clearer wording when nagging about root logins. 2009-05-15 23:57:50 +00:00
erh f0bb687386 Add "/pub" to the PKG_PATH lines in the default .cshrc and .profile so they
actually have a chance of working.  Also provide an example of how to include
 more than one path.
2009-02-15 01:31:43 +00:00
cube b2c01596ed Sprinkle /usr/X11R7 where relevant. rc.d/x{fs,dm} are left to be done. 2008-11-19 18:07:19 +00:00
agc d36ba31209 Fix csh syntax in last 2008-11-11 01:05:48 +00:00
joerg 0a197de3d4 Add commented out example of PKG_PATH to make using binary packages
easier.
2008-11-10 23:17:13 +00:00
pavel 990a4b27aa Source /etc/shrc only if it exists. Inspired by PR install/37209. 2007-11-24 11:14:41 +00:00
pavel d8b49bb74e Factor out common settings from /root/.shrc and /etc/skel/.shrc to a
new file /etc/shrc.

As proposed on tech-userlevel.
2006-09-14 13:01:31 +00:00
hubertf d0b2986f47 Sync order with src/etc/skel/dot.cshrc, no functional change. 2006-08-31 22:33:14 +00:00
sketch fbdc9c3fcb Use hostname(1) in preference to uname(1) in case /usr isn't mounted. 2005-02-22 09:12:17 +00:00
sketch 28dfc695f0 Revision 1.2 of dot.shrc changed the prompt to use a HOST variable without
setting it anywhere, so set it here.
2005-02-22 08:28:34 +00:00
lukem ee04d88971 Consistently use CONFIGFILES & CONFIGLINKS (which enable the 'configinstall'
target) instead of using home-grown 'distribution' targets or using
FILES with the 'install' target.
Add some etc/ subdir Makefiles where appropriate.

XXX: some of etc/Makefile install-etc-files could be converted to CONFIGFILES.
2004-05-16 09:53:09 +00:00
cjep d1b485c800 Now that we have nuked /sys, change the cdpath to contain /usr/src/sys
rather than /sys.
2003-09-02 18:39:27 +00:00
abs 5470c1def0 If we are going to point ENV at .shrc, and link this in as /.profile as well
as /root/.profile, then use /root/.shrc rather than $HOME/.shrc otherwise
single user mode tries to use /.shrc...
2002-10-10 11:15:41 +00:00
toddpw 9af306351b Fix syntax error in r1.5 -- semicolon needed before closing brace on same line. 2001-04-01 01:32:10 +00:00
tv e64fcaf2af Also make hup work in single user; revert dot.cshrc to atatat's version,
and make equivalent for dot.shrc.
2001-03-01 22:45:49 +00:00
tv 15f19b7a16 Use "head -1" as a generic way to snarf the first line of the pid file;
also works with the existing alias in dot.shrc.
2001-03-01 22:30:41 +00:00
atatat f4ad2126ae Teach the hup alias to deal with sendmail's pid file 2001-03-01 22:26:57 +00:00
simonb 598c993af2 Add RCSid. 2000-05-14 23:13:54 +00:00
mycroft e3d7832343 Minor change:
Don't use a backquote expression to get the host name; use a pattern
substitution on lop-nor.ihack.net instead.
2000-05-14 18:20:55 +00:00
frueauf 83072a01c7 Since src/gnu/usr.sbin is populated add it to the cdpath. 2000-05-06 13:17:33 +00:00
mycroft 4bf1c78bfb Make the tset stuff actually set the environment variables again.
Someone was on crack.
2000-02-19 19:00:13 +00:00
mycroft b24c03aa71 Simplify the tset crap, and do not set $HOME gratuitously. 2000-02-19 18:39:01 +00:00
jwise 4316d096db 1.) bring over the second half of David Brownlee's change to dot.login --
don't query the user for terminal type if the type is not `unknown'

2.) change this a little in both the csh and the [k]sh cases -- do call
    tset(1) even if the terminal type is known (so that TERMCAP is set
    properly, but don't have it query the user.
2000-02-16 03:07:09 +00:00
jwise 8d796b1774 Port to [k]sh(1) startup files David Brownlee's improvement from
cvs rdiff -r1.4 -r1.5 basesrc/etc/root/dot.login

As there, text is from Miles Nordin.
2000-02-16 02:02:02 +00:00
abs 6d39fee74c Only display the 'use su' message in the non 'su -' case.
Update the 'use su' message (text from Miles Nordin).
If the terminal type is !unknown, do not prompt for it.
2000-02-15 19:29:54 +00:00
mycroft c43c81eec7 (Ab?)use some sh(1) features:
* Put the aliases in a separate file, referenced by $ENV, so that they're
  present in subshells.
* Do the same to make `set -o emacs' happen automatically in interactive
  shells.  (Yay, line editing by default!)
* Use `export FOO=bar' syntax, as it's shorter and other sh(1)-like shells
  all support it these days.
1999-11-05 11:30:13 +00:00
abs f85ff94580 Don't don't don't assume /usr/bin/id is always present. Loses in single user. 1999-06-15 05:44:22 +00:00
mycroft 0d59551634 Avoid using id(1), as this loses when /usr isn't mounted. 1999-04-04 09:58:57 +00:00
hubertf b779dad4d4 Add hup, ll and x shell functions similar to the aliases in dot.cshrc
plus set the prompt. Tested with /bin/sh and /bin/ksh.
1999-03-30 02:36:05 +00:00