================================
firstrun:source=0.1-1
cvc rdiff firstrun -1 /[EMAIL PROTECTED]:1-devel/0.1-1
================================
0.1-1 Ken VanDine ([EMAIL PROTECTED]) Tue Sep 5 22:57:20 2006
First stab at configuring Xorg at firstboot
firstrun.init: new
--- /dev/null
+++ firstrun.init
@@ -0,0 +32 @@
+#/bin/bash
+#
+# Copyright (c) 2006 rPath, Inc.
+#
+# chkconfig: 345 02 15
+# description: Runs the firstrun configuration utility
+
+# Source function library.
+. /etc/init.d/functions
+
+start() {
+ echo -n $"Running Firstrun:"
+ /usr/sbin/firstrun
+ RETVAL=$?
+ [ $RETVAL = 0 ] && touch /var/lock/subsys/firstrun && success || failure
+ echo
+ return $RETVAL
+}
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ *)
+ echo $"Usage: $0 {start}"
+ exit 1
+esac
+
+exit $?
firstrun: new
--- /dev/null
+++ firstrun
@@ -0,0 +37 @@
+#!/bin/bash
+
+if [ $UID != 0 ]
+then
+ echo "Must be run as root"
+ exit
+fi
+
+if [ -f /etc/sysconfig/firstrun ]
+then
+ . /etc/sysconfig/firstrun
+else
+ RUN_FIRSTRUN="YES"
+fi
+
+if [ $RUN_FIRSTRUN ] && [ $RUN_FIRSTRUN == "YES" ]
+then
+ #echo "Do you wish to configure X? [y/n]"
+ #read xconfig
+ xconfig = "y"
+ if [ $xconfig == "y" ] || [ $xconfig == "Y" ]
+ then
+ echo "Configuring the X Windows System"
+ /usr/bin/Xorg -configure :2
+ /bin/cp /etc/X11/xorg.conf /etc/X11/xorg.conf.firstrun
+ /bin/cp /root/xorg.conf.new /etc/X11/xorg.conf
+ fi
+ #echo "Please enter your desired username:"
+ #read username
+ #echo "Please enter full name:"
+ #read fullname
+ #echo $username
+ #echo $fullname
+ #/usr/sbin/useradd -c "$fullname" -G wheel $username
+ #/usr/bin/passwd $username
+ echo "RUN_FIRSTRUN=NO" > /etc/sysconfig/firstrun
+fi
firstrun.recipe: new
--- /dev/null
+++ firstrun.recipe
@@ -0,0 +14 @@
+class Firstrun(PackageRecipe):
+
+ buildRequires = ['chkconfig:runtime']
+
+ name = 'firstrun'
+ version = '0.1'
+
+ def setup(r):
+ r.addSource('firstrun.init')
+ r.addSource('firstrun')
+ r.addSource('firstrun.sysconfig')
+ r.Install('firstrun.init', '%(initdir)s/firstrun')
+ r.Install('firstrun.sysconfig', '%(sysconfdir)s/sysconfig/firstrun')
+ r.Install('firstrun', '%(sbindir)s/')
firstrun.sysconfig: new
--- /dev/null
+++ firstrun.sysconfig
@@ -0,0 +1 @@
+RUN_FIRSTRUN=YES
Committed by: krv
_______________________________________________
Desktop-commits mailing list
[email protected]
http://lists.bizrace.com/mailman/listinfo/desktop-commits