summaryrefslogtreecommitdiffstats
path: root/build_tools/clarch/larch/profiles/i586-testing-REMOTE/rootoverlay/etc/X11/xinit/startx.custom
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
commit618d4ad515a93d1e48934be5846edd71270171ec (patch)
treea22a9294af81215d4a7b1053e5fdb4d746f39d41 /build_tools/clarch/larch/profiles/i586-testing-REMOTE/rootoverlay/etc/X11/xinit/startx.custom
downloadlinhes_dev-618d4ad515a93d1e48934be5846edd71270171ec.zip
initital import
Diffstat (limited to 'build_tools/clarch/larch/profiles/i586-testing-REMOTE/rootoverlay/etc/X11/xinit/startx.custom')
-rw-r--r--build_tools/clarch/larch/profiles/i586-testing-REMOTE/rootoverlay/etc/X11/xinit/startx.custom22
1 files changed, 22 insertions, 0 deletions
diff --git a/build_tools/clarch/larch/profiles/i586-testing-REMOTE/rootoverlay/etc/X11/xinit/startx.custom b/build_tools/clarch/larch/profiles/i586-testing-REMOTE/rootoverlay/etc/X11/xinit/startx.custom
new file mode 100644
index 0000000..8e3ec5e
--- /dev/null
+++ b/build_tools/clarch/larch/profiles/i586-testing-REMOTE/rootoverlay/etc/X11/xinit/startx.custom
@@ -0,0 +1,22 @@
+if grep -v nox /proc/cmdline &>/dev/null && \
+ [ -z "$DISPLAY" ] && echo $(tty) | grep /vc/1 &>/dev/null; then
+ if grep i810 /proc/cmdline &>/dev/null; then
+ startx -- -config xorg.conf.i810
+ else
+ startx
+ fi
+
+ # Maybe there should be some code here to handle a failed startx?
+
+ # The 'return' value is at /tmp/xlogout
+ # If there is nothing there, switch user to 'newuser'
+ # If there is also nothing there, login as root
+ # - if already root, fall through to terminal
+
+ if [ -f /tmp/xlogout ] || [ -f /tmp/newuser ]; then
+ logout
+ elif [ ${UID} -ne 0 ]; then
+ echo "root" >/tmp/newuser
+ logout
+ fi
+fi