Magellan Linux

Contents of /trunk/mlivecdbuild/profiles/openvpn-i686/prepare_custom

Parent Directory Parent Directory | Revision Log Revision Log


Revision 593 - (show annotations) (download)
Sun Oct 14 23:51:03 2007 UTC (16 years, 6 months ago) by niro
File size: 3191 byte(s)
-fixed citrix config dir permissions

1 #!/bin/bash
2
3 # language locales
4 install -m 0644 $(get_profile custom-files/35locale) ${CDCHROOTDIR}/etc/env.d/ || die
5 # enable the locale (needed with >=glibc-2.5)
6 if [[ -x ${CDCHROOTDIR}/usr/sbin/locale-gen ]]
7 then
8 source $(get_profile custom-files/35locale)
9 sed -i "s:^#${LC_ALL}:${LC_ALL}:g" ${CDCHROOTDIR}/etc/locale.gen
10 chroot ${CDCHROOTDIR} locale-gen
11 fi
12 chroot ${CDCHROOTDIR} env-rebuild
13
14 # install openvpn-setup initscript
15 install -m 0755 $(get_profile custom-files/setup-openvpn.rc) ${CDCHROOTDIR}/etc/rc.d/init.d/setup-openvpn || die
16 MROOT="${CDCHROOTDIR}" rc-config add setup-openvpn
17
18 # install single-x11 session script
19 install -m 0755 $(get_profile custom-files/single-x11.sh) ${CDCHROOTDIR}/usr/sbin/single-x11 || die
20 install -m 0755 $(get_profile custom-files/single-x11.rc) ${CDCHROOTDIR}/etc/rc.d/init.d/single-x11 || die
21 MROOT="${CDCHROOTDIR}" rc-config add single-x11
22
23 # add magellan user
24 chroot ${CDCHROOTDIR} useradd -m -g users -G audio,wheel,cdrom,video,cdrw,usb,games -s /bin/bash magellan
25 # set password to 'magellan'
26 chroot ${CDCHROOTDIR} usermod -p $(openssl passwd -1 magellan) magellan
27
28 # setup magellan's home
29 install -m 0644 $(get_profile custom-files/dotxinitrc) ${CDCHROOTDIR}/home/magellan/.xinitrc || die
30
31 # setup idesk defaults
32 install -m 0644 $(get_profile custom-files/dotideskrc) ${CDCHROOTDIR}/home/magellan/.ideskrc || die
33 install -d ${CDCHROOTDIR}/home/magellan/.idesktop
34 chroot ${CDCHROOTDIR} chown -R magellan:users /home/magellan/.ideskrc || die
35 chroot ${CDCHROOTDIR} chown -R magellan:users /home/magellan/.idesktop || die
36
37 # setup fluxbox defaults
38 install -d ${CDCHROOTDIR}/home/magellan/.fluxbox
39 for i in init keys menu menuconfig usermenu
40 do
41 install -m 0644 $(get_profile custom-files/fluxbox/${i}) ${CDCHROOTDIR}/home/magellan/.fluxbox || die
42 done
43 install -m 0755 $(get_profile custom-files/fluxbox/startup) ${CDCHROOTDIR}/home/magellan/.fluxbox || die
44 install -d ${CDCHROOTDIR}/home/magellan/.fluxbox/styles
45 cp -R $(get_profile custom-files/fluxbox/styles/Serenity) ${CDCHROOTDIR}/home/magellan/.fluxbox/styles || die
46 chroot ${CDCHROOTDIR} chown -R magellan:users /home/magellan/.fluxbox || die
47
48 # install our custom fluxbox menu generator script
49 install -m 0755 $(get_profile custom-files/fluxbox-generate_menu_custom.sh) ${CDCHROOTDIR}/usr/bin/fluxbox-generate_menu_custom || die
50
51 # allow all users to shutdown the system via sudo
52 install -m 0440 $(get_profile custom-files/sudoers) ${CDCHROOTDIR}/etc || die
53
54 # setup citrix client
55 install -d ${CDCHROOTDIR}/home/magellan/.ICAClient || die
56 touch ${CDCHROOTDIR}/home/magellan/.ICAClient/.eula_accepted || die
57 chroot ${CDCHROOTDIR} chown -R magellan:users /home/magellan/.ICAClient || die
58
59 # set up our default preferences for firefox
60 eval CHROOT_$(cat ${CDCHROOTDIR}/etc/env.d/90mozilla-firefox | grep MOZILLA_FIVE_HOME)
61 install -m 0644 $(get_profile custom-files/mozilla-firefox-magellan-default-prefs.js) \
62 ${CDCHROOTDIR}/${CHROOT_MOZILLA_FIVE_HOME}/greprefs/all-magellan.js || die
63 install -m 0644 $(get_profile custom-files/mozilla-firefox-magellan-default-prefs.js) \
64 ${CDCHROOTDIR}/${CHROOT_MOZILLA_FIVE_HOME}/defaults/pref/all-magellan.js || die
65 unset CHROOT_MOZILLA_FIVE_HOME