Sending Tcsh to packages/ports ...
freebsd at qeng-ho.org
Fri Mar 29 12:52:24 UTC 2019
On 29/03/2019 02:56, Polytropon wrote:
> On Thu, 28 Mar 2019 19:03:24 -0700, Michael Sierchio wrote:
>> *kudzu at hearst:/bin 130>* ll -i | grep csh
>> 198147 -r-xr-xr-x 2 root wheel 427888 Jun 22 2018 csh*
>> 198147 -r-xr-xr-x 2 root wheel 427888 Jun 22 2018 tcsh*
> The csh / tcsh is not the only system component known by
> more than one name:
> % hardlinks.sh /bin
> 23621: csh tcsh <--- !
> 23627: ed red
> 23633: link ln
> 23638: pgrep pkill
> 23644: rm unlink
> 24944: [ test
Also /rescue/* where all but two of the executables have the same inode
> It's important to note that by querying $0 or argv, a
> program can change its behaviour depending on the way it
> has been invoked. So a call to "csh" could cause the program
> to do things differently than if it was called by "tcsh".
> Of course this also applies to _any_ programs, being part
> of the OS or being installed by ports.
> Sidenote: If the C shell would be removed from the system,
> and a port would be needed, the system's default install
> would not contain an interactive shell.
> a) Make bash the default system shell, /bin/bash; this will
> probably make many people very angry and will be widely
> regarded as a bad move. ;-)
Grey-bearded mobs with torches and pitchforks would ensue. :-)
> b) Let the user choose upon installation which shell to
> take from ports, and instantiate a symlink in the root
> file system, or install it into there right away. The
> choice list could contain, but is not limited to:
> - csh / tcsh
> - zsh
> - ksh
> - bash
> - dash
> - fish
> - rc
> Again, a default could be preselected, about which the
> same discussions could arise as about the quantity of
> the selection list.
> c) Keep sh the only shell on the system and let the user
> manually install a shell after OS installation via pkg.
> The core "problem" of ports is that they are restricted to
> the /usr/local subtree. On certain installations, this tree
> might not be accessible in single user mode or any other
> catastrophic scenario where only very limited means are
> provided (usually: / mounted read-only, nothing else).
> So if root's interactive shell is /usr/local/bin/zsh,
> for example, and /usr/local isn't mounted, that's a
> problem. You cannot even drop to sh and start zsh from
> there right away - you're stuck with sh for the moment.
> Further sidenote: It's possible that the transformation of
> "system | ports" into "everything is a pkg" makes the above
> consideration fultile. :-)
What do we want?
A time machine!
When do we want it?
More information about the freebsd-questions