]> spindle.queued.net Git - xodist/blobdiff - initchroot.sh
add xterm for erikg
[xodist] / initchroot.sh
index b9ee4654a772fe55cb57aa39198838482371312b..0ba3a6e0000b6e28b1f4e7c09c5e0ee2a629aafa 100755 (executable)
@@ -166,10 +166,11 @@ fbcon
 olpc_dcon
 scx200_acb
 i8042
+olpc_battery
 EOF
 
 # install packages
-(chroot ${ROOT_DIR} aptitude install -y `cat ${PLIST}`)
+(chroot ${ROOT_DIR} aptitude install -y `grep --invert-match '^#' ${PLIST}`)
 
 # configure X
 if [ -d ${ROOT_DIR}/etc/X11 ]; then
@@ -229,8 +230,7 @@ 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
-cat >>${ROOT_DIR}/etc/network/interfaces<<EOF
-
+cat <<EOF >> ${ROOT_DIR}/etc/network/interfaces
 auto lo
 iface lo inet loopback
 EOF
@@ -245,6 +245,17 @@ sugar
 EOF
 fi
 
+# run any local postinstall scripts for the build
+PLIST_DIR=${PLIST/.packages/}
+if [ -d ${PLIST_DIR} ]; then
+    if [ -x ${PLIST_DIR}/postinst.sh ]; then
+       ${PLIST_DIR}/postinst.sh ${ROOT_DIR}
+    fi
+    if [ -x ${PLIST_DIR}/postinst-local.sh ]; then
+       ${PLIST_DIR}/postinst-local.sh ${ROOT_DIR}
+    fi
+fi
+
 # override sources.list with shipping version
 printf "${APT_SOURCES}\n" >${ROOT_DIR}/etc/apt/sources.list
 (chroot ${ROOT_DIR} aptitude update)