Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: agentsmith.android on July 05, 2012, 03:38:01 PM

Title: .profile file is not running
Post by: agentsmith.android on July 05, 2012, 03:38:01 PM
Hi,

1. ".profile" for "tc" user is not running on login. I want to mention here that I have hacked rcS script for rootfs at many places. However, I don't see a reason why /home/tc/.profile need not run. Even when I do login with "su -s /bin/ash tc", it does not run. If I execute the script with ./.profile then it runs without any errors. Am I missing something?

2. Can any one tell me sequence of initial startup. I know it goes from init->/sbin/init->inittab->rc scripts->????. I dont have the code for /sbin/init. So, I was wondering if there is anything which runs after rcS before final user login.

Thanks.
Title: Re: .profile file is not running
Post by: gerald_clark on July 05, 2012, 04:09:39 PM
With an un-hacked system, /home/tc/.profile definitely runs at login.
Title: Re: .profile file is not running
Post by: agentsmith.android on July 05, 2012, 04:46:37 PM
@gerald_clark: Hey, do u have any idea which part of rcS does that? I might have hacked something which should not be done.
Title: Re: .profile file is not running
Post by: gerald_clark on July 05, 2012, 04:53:05 PM
I have no idea what or why you hacked.
Title: Re: .profile file is not running
Post by: agentsmith.android on July 05, 2012, 05:07:44 PM
I meant, do u know which part of rc script is responsible for running ".profile" on unhacked version. I have hacked it as I am running this on some custom hardware which does not have most of the hardware capabilities.
Thanks
Title: Re: .profile file is not running
Post by: tinypoodle on July 05, 2012, 05:10:16 PM
Running a 'diff' on default and modified file could be a starting point to troubleshoot ;)
Title: Re: .profile file is not running
Post by: Rich on July 05, 2012, 05:14:33 PM
Hi agentsmith.android
Before you start hacking, you might want to mention what it is you are trying to achieve, before you
break something (Opps, too late). If you do  ls -l /sbin/init  you will see it is really a link back to /bin/busybox,
which is where many of the base commands come from. The sources for that are here:
http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/src/
Title: Re: .profile file is not running
Post by: agentsmith.android on July 05, 2012, 05:43:02 PM
Thanks Rich.

Busybox source is what I needed.
Title: Re: .profile file is not running
Post by: curaga on July 05, 2012, 05:47:29 PM
su does not execute .profile without "-" at the end. It's not triggered by any script, but by the shell when launched as a login shell.