From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 76DB21381F3 for ; Wed, 3 Jul 2013 02:11:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C6A3E099F; Wed, 3 Jul 2013 02:11:20 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4C195E0998 for ; Wed, 3 Jul 2013 02:11:19 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UuCXM-00006b-H2 for gentoo-amd64@lists.gentoo.org; Wed, 03 Jul 2013 04:11:16 +0200 Received: from ip68-231-22-224.ph.ph.cox.net ([68.231.22.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Jul 2013 04:11:16 +0200 Received: from 1i5t5.duncan by ip68-231-22-224.ph.ph.cox.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 03 Jul 2013 04:11:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-amd64@lists.gentoo.org From: Duncan <1i5t5.duncan@cox.net> Subject: [gentoo-amd64] Re: Kernel-3.10 Nvidia Emerge Failure And Other Stuff Date: Wed, 3 Jul 2013 02:10:58 +0000 (UTC) Message-ID: References: <20130701153542.eedab9994a52502121e7e8e5@comcast.net> <20130702125454.161f55f908460aedaabf030a@comcast.net> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-amd64@lists.gentoo.org Reply-to: gentoo-amd64@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ip68-231-22-224.ph.ph.cox.net User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT 368aae4 /usr/src/portage/src/egit-src/pan2) X-Archives-Salt: 9337909a-b672-4703-bb5c-ee78e4d29d95 X-Archives-Hash: 4f6fd183e2ac80e54401cb135a5f2314 Frank Peters posted on Tue, 02 Jul 2013 12:54:54 -0400 as excerpted: (Thanks for the insight into your more direct boot scripts. I've done that with some things here, including with my own custom suspend/ hibernate scripts, but not with my bootscripts.) > So what does the "#!" option accomplish? Does it allow the kernel to > effect redirection based on "#!?" Yes. > This should only be necessary if bash > itself is not invoked, but in boot-up based on init and inittab, bash, I > believe, is automatically invoked for all scripts. But yet the agetty > program, after boot-up is essentially complete, fails to execute the > bash script in its parameter list. At this point is it agetty, or the > kernel, that is responsible for executing the autologin script? Given your customized setup I don't know for sure, but I can make an educated guess that at the point that breaks in that setup, the already running bootscript invokes a second script directly by name, as if it were a binary. With the kernel shebang option, that works as long as that second script is set executable. But without the kernel shebang option, it fails. The alternative that WOULD work, would be to call that second script using an indirect invocation with bash as the command executed directly by the kernel and the second script as a parameter to it, like so: bash (bash options) /path/to/script (script arguments) By doing it that way, the kernel invokes bash, which knows how to handle it, and can (I believe) in fact handle #!/bin/perl and other foreign interpreter shebangs as well, instead of the kernel attempting to execute the script directly, and failing if the kernel doesn't have shebang support loaded. (Altho it'll be obvious to some, it's also worth mentioning that with indirect script invocation via direct invocation of the interpreter, feeding it the script by commandline, the script itself no longer needs to have executable permissions, since bash is perfectly happy to execute any file it is fed on the commandline as long as it can read it, while the kernel refuses to execute files without the executable bit set.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman