Contents of /trunk/mlivecdbuild/profiles/openvpn-i686/prepare_custom
Parent Directory | Revision Log
Revision 582 -
(show annotations)
(download)
Sat Oct 13 11:42:09 2007 UTC (16 years, 6 months ago) by niro
File size: 2957 byte(s)
Sat Oct 13 11:42:09 2007 UTC (16 years, 6 months ago) by niro
File size: 2957 byte(s)
-added openvpn profile
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 | |
35 | # setup fluxbox defaults |
36 | install -d ${CDCHROOTDIR}/home/magellan/.fluxbox |
37 | for i in init keys menu menuconfig usermenu |
38 | do |
39 | install -m 0644 $(get_profile custom-files/fluxbox/${i}) ${CDCHROOTDIR}/home/magellan/.fluxbox || die |
40 | done |
41 | install -m 0755 $(get_profile custom-files/fluxbox/startup) ${CDCHROOTDIR}/home/magellan/.fluxbox || die |
42 | install -d ${CDCHROOTDIR}/home/magellan/.fluxbox/styles |
43 | cp -R $(get_profile custom-files/fluxbox/styles/Serenity) ${CDCHROOTDIR}/home/magellan/.fluxbox/styles || die |
44 | chroot ${CDCHROOTDIR} chown -R magellan:users /home/magellan/.fluxbox || die |
45 | |
46 | # install our custom fluxbox menu generator script |
47 | install -m 0755 $(get_profile custom-files/fluxbox-generate_menu_custom.sh) ${CDCHROOTDIR}/usr/bin/fluxbox-generate_menu_custom || die |
48 | |
49 | # allow all users to shutdown the system via sudo |
50 | install -m 0440 $(get_profile custom-files/sudoers) ${CDCHROOTDIR}/etc || die |
51 | |
52 | # setup citrix client |
53 | install -d ${CDCHROOTDIR}/home/magellan/.ICAClient || die |
54 | touch ${CDCHROOTDIR}/home/magellan/.ICAClient/.eula_accepted || die |
55 | |
56 | # set up our default preferences for firefox |
57 | eval CHROOT_$(cat ${CDCHROOTDIR}/etc/env.d/90mozilla-firefox | grep MOZILLA_FIVE_HOME) |
58 | install -m 0440 $(get_profile custom-files/mozilla-firefox-magellan-default-prefs.js) \ |
59 | ${CDCHROOTDIR}/${CHROOT_MOZILLA_FIVE_HOME}/greprefs/all-magellan.js || die |
60 | install -m 0440 $(get_profile custom-files/mozilla-firefox-magellan-default-prefs.js) \ |
61 | ${CDCHROOTDIR}/${CHROOT_MOZILLA_FIVE_HOME}/defaults/pref/all-magellan.js || die |
62 | unset CHROOT_MOZILLA_FIVE_HOME |