]> spindle.queued.net Git - xodist/blobdiff - initchroot.sh
olpc.fth: add video=lxfb as a kernel argument
[xodist] / initchroot.sh
index f77612d507a0c4959312167245aaa54e6b425f8b..1e6765846e1aec81c1aee586a75e3c82672c7253 100755 (executable)
@@ -18,7 +18,7 @@
 
 DIST=lenny
 DEFUSER=olpc
-PLIST=package_list
+PLIST=gnome.packages
 MIRROR=http://http.us.debian.org/debian/
 OTHERMIRROR=
 
@@ -140,6 +140,15 @@ cp cache/${k} ${ROOT_DIR}/${k}
 (chroot ${ROOT_DIR} dpkg -i /${k})
 rm -f ${ROOT_DIR}/${k}
 
+# ensure certain modules get loaded during boot
+cat >>${ROOT_DIR}/etc/modules<<EOF
+lxfb
+fbcon
+olpc_dcon
+scx200_acb
+i8042
+EOF
+
 echo "debxo" > ${ROOT_DIR}/etc/hostname
 cat >${ROOT_DIR}/etc/hosts<<EOF
 127.0.0.1 localhost.localdomain localhost
@@ -158,7 +167,7 @@ EOF
 (chroot ${ROOT_DIR} aptitude install -y `cat ${PLIST}`)
 
 # configure X
-if [ -d /etc/X11 ]; then
+if [ -d ${ROOT_DIR}/etc/X11 ]; then
     cat >${ROOT_DIR}/etc/X11/xorg.conf<<EOF
 # xorg.conf (X.Org X Window System server configuration file)
 
@@ -184,12 +193,12 @@ fi
 
 # configure kdm, kde
 if [ -d ${ROOT_DIR}/etc/kde3/kdm ]; then
-    sed --in-place 's/AllowNullPasswd=false/AllowNullPasswd=true/;s/#AutoLoginEnable=true/AutoLoginEnable=true/;s/#AutoLoginUser=fred/AutoLoginUser=olpc/' ${ROOT_DIR}/etc/kde3/kdm/kdmrc
+    sed --in-place "s/AllowNullPasswd=false/AllowNullPasswd=true/;s/#AutoLoginEnable=true/AutoLoginEnable=true/;s/#AutoLoginUser=fred/AutoLoginUser=${DEFUSER}/" ${ROOT_DIR}/etc/kde3/kdm/kdmrc
 fi
 
 # configure gdm, gnome
 if [ -d ${ROOT_DIR}/etc/gdm ]; then
-    sed -i 's_\[daemon\]_\[daemon\]\n\nGreeter=/usr/lib/gdm/gdmlogin\n\nAutomaticLoginEnable=true\n\nAutomaticLogin=olpc_' ${ROOT_DIR}/etc/gdm/gdm.conf
+    sed -i "s_\[daemon\]_\[daemon\]\n\nGreeter=/usr/lib/gdm/gdmlogin\n\nAutomaticLoginEnable=true\n\nAutomaticLogin=${DEFUSER}_" ${ROOT_DIR}/etc/gdm/gdm.conf
 fi
 if [ -d ${ROOT_DIR}/etc/gconf/2 ]; then
     cat >${ROOT_DIR}/etc/gconf/2/local-defaults.path<<EOF
@@ -212,7 +221,7 @@ rm -rf ${ROOT_DIR}/home/*;  # i have no idea what's adding this crap...
 (chroot ${ROOT_DIR} adduser ${DEFUSER} netdev)
 (chroot ${ROOT_DIR} adduser ${DEFUSER} powerdev)
 (chroot ${ROOT_DIR} adduser ${DEFUSER} floppy)
-echo "${DEFUSER} ALL=(ALL) ALL" >> ${ROOT_DIR}/etc/sudoers
+echo "${DEFUSER} ALL=(ALL) NOPASSWD: ALL" >> ${ROOT_DIR}/etc/sudoers
 
 # done, clean up
 mv ${ROOT_DIR}/sbin/start-stop-daemon.REAL ${ROOT_DIR}/sbin/start-stop-daemon