[Live-demo] Alternative OSGeoLive build process

Hamish hamish_b at yahoo.com
Sat Jun 2 16:01:17 PDT 2012


Alex:
> There is nothing that prevents us from having an account called "user"
> at time of build if needed. This just won't necessarily be the same
> account when the disc is live booted because the disc creates a new user
> on the fly every boot. The biggest side effect is that the home
> directory doesn't exist until boot at which point a user is created and
> the /etc/skel is used to populate the home dir defaults

n.b. we also have /etc/bash.bashrc and /etc/profile.d/ to play with.

to date my strategy for /etc/skel/ vs. /etc/home/user/ has been to put
"global" things like JAVA_HOME into the /etc/ settings so that new user
accounts get them (I usually make a second sandbox test account during QA)
and "local" things like the welcome message pop up and desktop background
I leave specific to /home/user/.


> (this means we can seed a firefox profile with the homepage set, etc.).

firefox homepage is a bit of a bad example, as the /home/user/.mozilla/
profile dir gets randomized hash in it, Ubuntu plays funny after-market
games with it depending on if it thinks you are online or off, and the
basic setting of it in preferences.js has always been a bit arcane.


> I believe scripts can also be run at time of user creation if we need
> to set the superuser in postgis at that point.

I seem to recall the same, but not how to do it. `/usr/sbin/adduser` is
just a perl script, and I don't see any hooks in there or /etc/adduser.conf
except for copying /etc/skel/ over. good chance I missed something though.


today I'll abstract the USER_NAME to main.sh in a fail-safe way (in all
scripts). there may be a minor problem here or there but overall it should
not be dangerous. I'll do it in a way so that scripts will still be able
to run independently, by defaulting to "user" if it isn't set.


regards,
Hamish



More information about the Osgeolive mailing list