From: "Michael Kjörling" <michael@kjorling.se>
To: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] run commands at login in v6 and stty
Date: Sat, 26 Feb 2022 21:03:09 +0000 [thread overview]
Message-ID: <b6552831-18a8-49dd-ac79-c93cd082972c@localhost> (raw)
In-Reply-To: <acd97ce7-5827-56ba-aec2-6cf4dbb41169@gmail.com>
On 26 Feb 2022 14:39 -0600, from will.senn@gmail.com (Will Senn):
> I'm sure it's simple, but I can't figure it out. How do I get something to
> run at login in v6?
From a very quick perusal of
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/usr/source/s2/sh.c it
doesn't look like you can, at least not in the way we're used to today
of having the shell execute a magic file (such as ~/.bashrc) during
startup. I also don't see anything in
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V6/etc/passwd that
suggests that the shell can be specified on a per-user basis the way
we're used to being able to do today, so the hack of making that point
to a program that does some initial setup and then launches the shell
proper also might not be readily available.
On the other hand,
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh/main.c
looks like it includes such support; see the section surrounding the
pathopen(nullstr, profile) call toward the bottom of main(). (Beware:
it's written in Bourne C.)
I won't say "you can't do it in V6", because I don't know things
anywhere near well enough to say that, but it doesn't look entirely
trivial at least, and it seems to have been added in V7's sh.
--
Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”
next prev parent reply other threads:[~2022-02-26 21:13 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-26 20:39 Will Senn
2022-02-26 21:03 ` Michael Kjörling [this message]
2022-02-26 22:49 ` Clem Cole
2022-02-26 23:12 ` Rob Pike
2022-02-27 0:46 ` Clem Cole
2022-02-27 15:01 ` Larry McVoy
2022-02-27 17:10 ` Clem Cole
2022-02-26 21:45 Brian Walden
2022-02-26 22:16 ` Rob Pike
2022-02-27 20:32 ` Sven Mascheck
2022-02-27 7:48 Noel Chiappa
2022-02-28 1:04 Douglas McIlroy
2022-02-28 7:22 ` Rob Pike
2022-02-28 14:07 ` Larry McVoy
2022-02-28 18:47 ` Dan Cross
2022-02-28 19:25 ` Dan Cross
2022-02-28 21:25 ` markus schnalke
2022-02-28 19:26 ` Clem Cole
2022-02-28 20:03 ` Adam Thornton
2022-02-28 18:18 ` Warner Losh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6552831-18a8-49dd-ac79-c93cd082972c@localhost \
--to=michael@kjorling.se \
--cc=tuhs@minnie.tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).