Received: from mx.kolabnow.com (mx.kolabnow.com [95.128.36.42]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 1F845781926 for <~alpine/users@lists.alpinelinux.org>; Thu, 3 Jun 2021 10:10:44 +0000 (UTC) Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 047C1DBF for <~alpine/users@lists.alpinelinux.org>; Thu, 3 Jun 2021 12:10:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= message-id:references:in-reply-to:subject:subject:from:from:date :date:content-transfer-encoding:content-type:content-type :mime-version:received:received:received; s=dkim20160331; t= 1622715042; x=1624529443; bh=LekwzT8IKmrn/X84lLeIbAInB+T6b1zy7fg k9htc1/4=; b=ZS+D4LQnDEcnMegPvNt8a5sId3BnXPwc/WXeVxHObo5PTM3Wh6s HBy9mLVUopvSZN9BLRRdz4eDORuxmQv0CPABI3cfEYGp4V/BFo8NhpfT1EMshcyC oo6z1VRpa71ai3Ql3KR/NvPZlAt3pLNCwZt+uuwxHpw1wK2u2MyTXHgwK0oNpXcb vRgTlJRQ+eV8CqCoTUtxkcixVgl51L1tm4yOA59Lv2auxKN8KST6erdRjnHn9cQO FTF6bFlWIS5lu8ASRSOuORonX6fMAKwgvtHNFf2K5pqT/ADOrGpuPgDRHhhvLviK s+bxqVe72MpQJLCpKeqZjxlcjknQSyVboTTIx4y2J4EIi7f6iTLARAoqFCdJU2C0 0nfayDdVW6bgbdAChzc/jD/bxhRgjoGAbL1zG4kCzBC26RpMB2hBWOxiwuoqoNON ft+CN5vMWDqu55MIY8XQeVU8DDhXXcWFFus/fMeEfcIZAm5MrC8TEU6sZPFJHeEO yfV+CJa88n79PTmz2Z/YlAz3yywYfxd6AiNl7+t7VMzGVZD9stF3HO0NXhKKFznx tiBwFcCoICf3812AdYV7xICKvGYV7oEEbcyYJuPgxaGyfJampwUwAfsHK0W25eym vdddXOJveYQvmTrtR8te07Nj2vNgfaslSHgN+xKn/lEUnvi6y+ZBS3h8= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lIPl_IPqvy88 for <~alpine/users@lists.alpinelinux.org>; Thu, 3 Jun 2021 12:10:42 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 68DB534C for <~alpine/users@lists.alpinelinux.org>; Thu, 3 Jun 2021 12:10:42 +0200 (CEST) Received: from int-subm003.mykolab.com (unknown [10.9.37.3]) by int-mx003.mykolab.com (Postfix) with ESMTPS id B85AF36D8 for <~alpine/users@lists.alpinelinux.org>; Thu, 3 Jun 2021 12:10:41 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 03 Jun 2021 12:10:40 +0200 From: =?UTF-8?Q?Jos=C3=A9_Alberto_Orejuela_Garc=C3=ADa?= To: ~alpine/users@lists.alpinelinux.org Subject: Re: Default shell is not executed as a login shell In-Reply-To: <47778e2d238ff3ff41c5238c4c459780@josealberto4444.com> References: <47778e2d238ff3ff41c5238c4c459780@josealberto4444.com> Message-ID: X-Sender: libre@josealberto4444.com On 2021-06-03 02:20, José Alberto Orejuela García wrote: > Hello, > > I have just installed (sys mode) Alpine in a Raspberry Pi 3B+ (using > aarch64 image). The problem I have is that /etc/profile is never > sourced, so the environment variables inside /etc/profile and > /etc/profile.d scripts are never set. I suspect that it is because the > default shell (ash, in this case) is not run as a login shell (ash > -l), but as a regular interactive shell. Is this a bug? Or how can I > change this behaviour? > > Thanks. I found my problem. I was starting an SSH session with a user whose default shell was fish (horrible idea). I thought that, when doing `su` and changing to root, the next shell should be also executed as a login shell, and that is not true. Only the first shell was executed as a login shell (which turned out to do nothing as fish does not follow standards very well). Summing up, changing the user default shell to ash solved the problem when using SSH, and I tested directly in the raspberry loging in as the root user and ash is also executed as a login shell. No problems on Alpine side but mine. =P Sorry for the inconvenience.