View previous topic :: View next topic |
Author |
Message |
Edgaer Tux's lil' helper
Joined: 01 Jul 2002 Posts: 145 Location: The Isle of the Sundered
|
Posted: Sat Aug 31, 2002 6:00 pm Post subject: Setting up stuff on first log-in |
|
|
How do I set things up so that certain tasks are preformed on first login (and first login only)? Things like generating public ssh keys, configuring basic crontab jobs, etc. Basically I'm thinking about upgrading to the gcc3.1.1 based gentoo and maybe xfs or something but am wondering like how to help automate setting up all the junk I have to manually when creating my user account(s) and stuff _________________ --First General Edgaer
Hope is the last to die. Unlike the icq flower. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sat Aug 31, 2002 7:06 pm Post subject: |
|
|
You could wrap your first-time only commands inside a test for the existence of a particular dotfile in your home directory. If the file already exists, then nothing happens. After your initial startup has begun, touch the file to create it to disable the initial startup commands. You could invert this test to check for the absence of a .virgin file or something, and delete .virgin when you are done with the initial setup.
Another way would be to source a first-time startup shell script from within your shell's init script only if it exists. After it runs, it could delete itself.
Hope some of this will give you some useful ideas. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
Edgaer Tux's lil' helper
Joined: 01 Jul 2002 Posts: 145 Location: The Isle of the Sundered
|
Posted: Thu Sep 05, 2002 3:22 am Post subject: |
|
|
Ok here's another question. How would I set it up so say a .emacs file exists but the set load path commands (for loading emacs modes for which there is no ebuild) points to /home/foo/path/here rather than ~/path/here _________________ --First General Edgaer
Hope is the last to die. Unlike the icq flower. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Sep 05, 2002 4:33 am Post subject: |
|
|
Past initial install, moving from Installing Gentoo to OTG. Edgaer, could you explain this in a little more detail? Shells usually expand ~ to your home directory, and I'm not exactly sure what you're asking. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
Edgaer Tux's lil' helper
Joined: 01 Jul 2002 Posts: 145 Location: The Isle of the Sundered
|
Posted: Thu Sep 05, 2002 11:37 am Post subject: |
|
|
rac wrote: | Past initial install, moving from Installing Gentoo to OTG. Edgaer, could you explain this in a little more detail? Shells usually expand ~ to your home directory, and I'm not exactly sure what you're asking. |
Well the .emacs file isn't a shell script but a lisp script. I'm not 100% certain it expands ~ but I could be wrong there. But then again I've never seen ~ used in any .emacs example files just full paths (eg. /home/foo/path/to/bar) _________________ --First General Edgaer
Hope is the last to die. Unlike the icq flower. |
|
Back to top |
|
|
|