110 lines
3.7 KiB
Bash
110 lines
3.7 KiB
Bash
# add fstab entries
|
|
#cat >> $MOUNTDIR/etc/fstab << _EOF
|
|
#/dev/mmcblk0p1 /mnt/sd0 auto defaults,noauto 0 0
|
|
#_EOF
|
|
#mkdir $MOUNTDIR/mnt/{ndda1,ndda2,sd0,sda1,sda2}
|
|
|
|
# disable nfs
|
|
#chroot $MOUNTDIR chkconfig --del nfslock
|
|
#chroot $MOUNTDIR chkconfig --del portmap
|
|
#chroot $MOUNTDIR chkconfig --del ts-calibrate
|
|
|
|
## disable random
|
|
#chroot $MOUNTDIR chkconfig --del random
|
|
|
|
## enable ftp server
|
|
#sed -i "s|\(.*disable[[:space:]]*= \)yes|\1no|" $MOUNTDIR/etc/xinetd.d/vsftpd
|
|
#sed -i "s|#local_enable|local_enable|" $NOUNTDIR/etc/vsftpd.conf
|
|
#sed -i "s|#write_enable|write_enable|" $NOUNTDIR/etc/vsftpd.conf
|
|
#sed -i "/root/d" $MOUNTDIR/etc/vsftpd/user_list
|
|
#sed -i "/root/d" $MOUNTDIR/etc/vsftpd/chroot-list
|
|
|
|
## remove alsa configuration for now
|
|
#rm $MOUNTDIR/etc/asound.conf
|
|
|
|
# remove some services
|
|
#rm -f $MOUNTDIR/etc/rc?.d/???{iptables,acpid}
|
|
|
|
## generate RPM scripts first time execution
|
|
#make_rpm_first_time_script "\
|
|
#chkconfig --del acpid
|
|
#chkconfig --del alsa
|
|
#chkconfig --del iptables
|
|
#chkconfig --del nfslock
|
|
#chkconfig --del portmap
|
|
#"
|
|
|
|
## use system default language
|
|
#> $MOUNTDIR/etc/sysconfig/i18n
|
|
|
|
# configure touchscreen
|
|
cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
|
|
TSLIB_CONFFILE=/etc/ts.conf
|
|
TSLIB_CONSOLEDEVICE=none
|
|
TSLIB_FBDEVICE=/dev/fb0
|
|
TSLIB_TSDEVICE=/dev/input/event0
|
|
TSLIB_CALIBFILE=/etc/pointercal
|
|
HOME=/root
|
|
_EOF
|
|
|
|
# change inittab so it opens tty root shells instead of asking for login
|
|
#
|
|
echo "Forcing \`inittab' to open tty root shells with no login..."
|
|
sed -i 's,^1:.*,1:234:respawn:/sbin/mingetty --autologin root --loginpause --noclear tty1,' $MOUNTDIR/etc/inittab
|
|
sed -i 's,^\([2-3]\):.*,\1:2345:respawn:/sbin/mingetty --autologin root --loginpause --noclear tty\1,' $MOUNTDIR/etc/inittab
|
|
sed -i 's,^4:.*,4:2345:respawn:/sbin/agetty ttyS0 115200,' $MOUNTDIR/etc/inittab
|
|
sed -i 's,^5:.*,5:2345:respawn:/sbin/agetty ttyGS0 115200,' $MOUNTDIR/etc/inittab
|
|
sed -i 's,^6:.*,6:2345:respawn:/sbin/agetty ttyAMA0 115200,' $MOUNTDIR/etc/inittab
|
|
#sed -i '/^[5-6]:.*/d' $MOUNTDIR/etc/inittab
|
|
|
|
# configure for runlevel 5 boot
|
|
sed -i "s|id:3\(:initdefault.*\)|id:5\1|" $MOUNTDIR/etc/inittab
|
|
|
|
# configure KDM for autologin
|
|
#
|
|
if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
|
|
sed -i 's|[#]*AutoLoginEnable=.*|AutoLoginEnable=true|' \
|
|
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
|
|
sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \
|
|
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
|
|
sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \
|
|
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
|
|
fi
|
|
|
|
# set timezone according to LANGUAGE (default is UTC)
|
|
#
|
|
case $LANGUAGE in
|
|
it) timezone=Europe/Rome ;;
|
|
es) timezone=Europe/Madrid ;;
|
|
*) timezone=UTC ;;
|
|
esac
|
|
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
|
|
|
|
# configure favorites in kde menu
|
|
for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do
|
|
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
|
done
|
|
|
|
# remove some documentation to save space
|
|
for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do
|
|
find $MOUNTDIR/usr/share/doc -name $f -exec rm -f {} \;
|
|
done
|
|
|
|
# disable filesystem autocheck due to a kernel bug in hannspad (blkid generated kernel crash)
|
|
if [ "$ARCH" = "arm" ]; then
|
|
sed -i "s|FS_PARTS_UPDATE=yes|FS_PARTS_UPDATE=no|" $MOUNTDIR/etc/sysconfig/postplug
|
|
sed -i "s|FS_SWAP_UPDATE=yes|FS_SWAP_UPDATE=no|" $MOUNTDIR/etc/sysconfig/postplug
|
|
fi
|
|
|
|
# FIXME: this should be done by postplug only when touchscreen is detected
|
|
mkdir -p $MOUNTDIR/home/liveuser/.icons/default
|
|
cat > $MOUNTDIR/home/liveuser/.icons/default/index.theme << _EOF
|
|
[Icon Theme]
|
|
Inherits=xcursor-transparent
|
|
_EOF
|
|
|
|
# configure default liveuser password
|
|
echo "openmamba" | chroot $MOUNTDIR passwd liveuser --stdin
|
|
|
|
prelink
|