Date: Fri, 29 Mar 2019 03:56:38 +0100 From: Polytropon <freebsd@edvax.de> To: Michael Sierchio <kudzu@tenebras.com> Cc: mayuresh@kathe.in, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Sending Tcsh to packages/ports ... Message-ID: <20190329035638.db780898.freebsd@edvax.de> In-Reply-To: <CAHu1Y70K=E-4EY6bjy9-59LCmX0a0u4ga2_mCywiTdmk4suW-w@mail.gmail.com> References: <64780f09d4251b9641e3bca39000ae2d@kathe.in> <CAHu1Y70K=E-4EY6bjy9-59LCmX0a0u4ga2_mCywiTdmk4suW-w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Mar 2019 19:03:24 -0700, Michael Sierchio wrote: > *kudzu@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 It's important to note that by querying $0 or argv[0], 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. Alternatives: 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. ;-) 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. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190329035638.db780898.freebsd>