From owner-freebsd-questions@freebsd.org Fri Mar 29 12:52:24 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2F0F1567B3C for ; Fri, 29 Mar 2019 12:52:24 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from bede.qeng-ho.org (bede.qeng-ho.org [217.155.128.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04EAD8FF64 for ; Fri, 29 Mar 2019 12:52:22 +0000 (UTC) (envelope-from freebsd@qeng-ho.org) Received: from arthur.home.qeng-ho.org (arthur.home.qeng-ho.org [172.23.1.2]) by bede.qeng-ho.org (Postfix) with ESMTP id D344810651; Fri, 29 Mar 2019 12:52:13 +0000 (GMT) Subject: Re: Sending Tcsh to packages/ports ... To: Polytropon Cc: FreeBSD Questions References: <64780f09d4251b9641e3bca39000ae2d@kathe.in> <20190329035638.db780898.freebsd@edvax.de> From: Arthur Chance Message-ID: <1404f209-3b1f-4fa5-b8f7-56eef7f1fc40@qeng-ho.org> Date: Fri, 29 Mar 2019 12:52:13 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190329035638.db780898.freebsd@edvax.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 04EAD8FF64 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of freebsd@qeng-ho.org designates 217.155.128.241 as permitted sender) smtp.mailfrom=freebsd@qeng-ho.org X-Spamd-Result: default: False [-6.12 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:217.155.128.240/29]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[qeng-ho.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[mx1.mythic-beasts.com,mx2.mythic-beasts.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.99)[-0.987,0]; IP_SCORE(-2.83)[ip: (-8.64), ipnet: 217.155.0.0/16(-4.32), asn: 13037(-1.09), country: GB(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13037, ipnet:217.155.0.0/16, country:GB]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 12:52:24 -0000 On 29/03/2019 02:56, Polytropon wrote: > 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 Also /rescue/* where all but two of the executables have the same inode number. > 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. ;-) 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? Errm ...