#!/bin/bash # language locales install -m 0644 $(get_profile custom-files/35locale) ${CDCHROOTDIR}/etc/env.d/ || die # enable the locale (needed with >=glibc-2.5) if [[ -x ${CDCHROOTDIR}/usr/sbin/locale-gen ]] then source $(get_profile custom-files/35locale) sed -i "s:^#${LC_ALL}:${LC_ALL}:g" ${CDCHROOTDIR}/etc/locale.gen chroot ${CDCHROOTDIR} locale-gen fi chroot ${CDCHROOTDIR} env-rebuild # install openvpn-setup initscript install -m 0755 $(get_profile custom-files/setup-openvpn.rc) ${CDCHROOTDIR}/etc/rc.d/init.d/setup-openvpn || die MROOT="${CDCHROOTDIR}" rc-config add setup-openvpn # install single-x11 session script install -m 0755 $(get_profile custom-files/single-x11.sh) ${CDCHROOTDIR}/usr/sbin/single-x11 || die install -m 0755 $(get_profile custom-files/single-x11.rc) ${CDCHROOTDIR}/etc/rc.d/init.d/single-x11 || die MROOT="${CDCHROOTDIR}" rc-config add single-x11 # add magellan user chroot ${CDCHROOTDIR} useradd -m -g users -G audio,wheel,cdrom,video,cdrw,usb,games -s /bin/bash magellan # set password to 'magellan' chroot ${CDCHROOTDIR} usermod -p $(openssl passwd -1 magellan) magellan # setup magellan's home install -m 0644 $(get_profile custom-files/dotxinitrc) ${CDCHROOTDIR}/home/magellan/.xinitrc || die # setup idesk defaults install -m 0644 $(get_profile custom-files/dotideskrc) ${CDCHROOTDIR}/home/magellan/.ideskrc || die install -d ${CDCHROOTDIR}/home/magellan/.idesktop # setup fluxbox defaults install -d ${CDCHROOTDIR}/home/magellan/.fluxbox for i in init keys menu menuconfig usermenu do install -m 0644 $(get_profile custom-files/fluxbox/${i}) ${CDCHROOTDIR}/home/magellan/.fluxbox || die done install -m 0755 $(get_profile custom-files/fluxbox/startup) ${CDCHROOTDIR}/home/magellan/.fluxbox || die install -d ${CDCHROOTDIR}/home/magellan/.fluxbox/styles cp -R $(get_profile custom-files/fluxbox/styles/Serenity) ${CDCHROOTDIR}/home/magellan/.fluxbox/styles || die chroot ${CDCHROOTDIR} chown -R magellan:users /home/magellan/.fluxbox || die # install our custom fluxbox menu generator script install -m 0755 $(get_profile custom-files/fluxbox-generate_menu_custom.sh) ${CDCHROOTDIR}/usr/bin/fluxbox-generate_menu_custom || die # allow all users to shutdown the system via sudo install -m 0440 $(get_profile custom-files/sudoers) ${CDCHROOTDIR}/etc || die # setup citrix client install -d ${CDCHROOTDIR}/home/magellan/.ICAClient || die touch ${CDCHROOTDIR}/home/magellan/.ICAClient/.eula_accepted || die # set up our default preferences for firefox eval CHROOT_$(cat ${CDCHROOTDIR}/etc/env.d/90mozilla-firefox | grep MOZILLA_FIVE_HOME) install -m 0440 $(get_profile custom-files/mozilla-firefox-magellan-default-prefs.js) \ ${CDCHROOTDIR}/${CHROOT_MOZILLA_FIVE_HOME}/greprefs/all-magellan.js || die install -m 0440 $(get_profile custom-files/mozilla-firefox-magellan-default-prefs.js) \ ${CDCHROOTDIR}/${CHROOT_MOZILLA_FIVE_HOME}/defaults/pref/all-magellan.js || die unset CHROOT_MOZILLA_FIVE_HOME