]> spindle.queued.net Git - xodist/blobdiff - initchroot.sh
merge lunge
[xodist] / initchroot.sh
index 79a45094e57fc4c8528803f83de1ca8b1a6cb08b..565a18c5e0102102a9d066ba4c6630f6b48ba93e 100755 (executable)
@@ -55,6 +55,10 @@ do
                ;;
        --package-list)
                PLIST=$2
+               [ -f ${PLIST} ] || {
+                       echo "Error: can't find file '${PLIST}'!" 1>&2
+                       exit 2
+               }
                shift
                ;;
        --mirror)
@@ -135,7 +139,7 @@ echo "en_US.UTF-8 UTF-8" >${ROOT_DIR}/etc/locale.gen
 
 k="http://lunge.mit.edu/~dilinger/debxo-0.2/initramfs-tools_0.92l.2_all.deb 
  http://lunge.mit.edu/~dilinger/debxo-0.2/ofw-config_0.1_all.deb 
- http://lunge.mit.edu/~dilinger/debxo-0.2/linux-2.6.25.15_2.6.25.15-140_i386.deb"
+ http://lunge.mit.edu/~dilinger/debxo-0.2/linux-2.6.25.15_2.6.25.15-144_i386.deb"
 mkdir -p cache
 for i in $k; do
        pkg=$(basename ${i})
@@ -229,14 +233,21 @@ rm -rf ${ROOT_DIR}/home/*;        # i have no idea what's adding this crap...
 echo "${DEFUSER} ALL=(ALL) NOPASSWD: ALL" >> ${ROOT_DIR}/etc/sudoers
 
 # add local network interface
-# (works around a kde session start problem)
 cat <<EOF >> ${ROOT_DIR}/etc/network/interfaces
-
-# added by xodist
 auto lo
 iface lo inet loopback
 EOF
 
+# configure sugar
+if [ -d ${ROOT_DIR}/usr/share/sugar ]; then
+    # #?
+    ln -sf /usr/share/activities/ ${ROOT_DIR}/usr/share/sugar
+    cat >> ${ROOT_DIR}/home/${DEFUSER}/.Xsession <<- EOF
+matchbox-window-manager -use_titlebar no &
+sugar
+EOF
+fi
+
 # done, clean up
 mv ${ROOT_DIR}/sbin/start-stop-daemon.REAL ${ROOT_DIR}/sbin/start-stop-daemon
 (chroot ${ROOT_DIR} aptitude clean)