fc88fb26ae 2011-02-22 treeofsephiro: # d8888 .d88888b. .d8888b. fc88fb26ae 2011-02-22 treeofsephiro: # d88888 d88P" "Y88b d88P Y88b fc88fb26ae 2011-02-22 treeofsephiro: # d88P888 888 888 Y88b. fc88fb26ae 2011-02-22 treeofsephiro: # d88P 888 88888b. .d88b. 88888b. 888 888 "Y888b. fc88fb26ae 2011-02-22 treeofsephiro: # d88P 888 888 "88b d88""88b 888 "88b 888 888 "Y88b. fc88fb26ae 2011-02-22 treeofsephiro: # d88P 888 888 888 888 888 888 888 888 888 "888 fc88fb26ae 2011-02-22 treeofsephiro: # d8888888888 888 888 Y88..88P 888 888 Y88b. .d88P Y88b d88P fc88fb26ae 2011-02-22 treeofsephiro: # d88P 888 888 888 "Y88P" 888 888 "Y88888P" "Y8888P" fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------ fc88fb26ae 2011-02-22 treeofsephiro: # Check out the full project at http://typewith.me/AnonOS fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: # Filename: base.ks fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: # This is the base kickstart file for all AnonOS builds. It will not make a functional LiveCD by itself. However, packages and scripts put here will be included in all builds, although they can be removed as needed. fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: # Most of the work here is credited to the Fedora Developers who created the original liveCD kickstarts. fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Developers: fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------ fc88fb26ae 2011-02-22 treeofsephiro: # Sephiroth - Compiled this kickstart. I'm not at all knowledgeable with programming or scripting, so you're going to have to help me here. Scripts are needed to rebrand this system from Fedora, add I2p and bitcoin, install Firefox add-ons, and other awesome stuff. fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # General Settings fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Localization fc88fb26ae 2011-02-22 treeofsephiro: # You could override these settings to add localization suites for specific countries. Just import this base, and add the required packages. Here's an example for German: http://typewith.me/german-localization http://preview.tinyurl.com/4wf3ml7 fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: lang en_US.UTF-8 fc88fb26ae 2011-02-22 treeofsephiro: keyboard us fc88fb26ae 2011-02-22 treeofsephiro: timezone US/Eastern fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: auth --useshadow --enablemd5 fc88fb26ae 2011-02-22 treeofsephiro: selinux --enforcing fc88fb26ae 2011-02-22 treeofsephiro: firewall --enabled --service=mdns fc88fb26ae 2011-02-22 treeofsephiro: xconfig --startxonboot fc88fb26ae 2011-02-22 treeofsephiro: part / --size 3072 --fstype ext4 fc88fb26ae 2011-02-22 treeofsephiro: services --enabled=NetworkManager --disabled=network,sshd fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Package Repositories fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # We need to make our own repos for our own RPM packages. If you have a server, please help us! fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # Fedora repos. fc88fb26ae 2011-02-22 treeofsephiro: #repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch fc88fb26ae 2011-02-22 treeofsephiro: repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-14&arch=$basearch fc88fb26ae 2011-02-22 treeofsephiro: repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f14&arch=$basearch fc88fb26ae 2011-02-22 treeofsephiro: #repo --name=updates-testing --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f14&arch=$basearch fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #RPMFusion. It gives you more apps. fc88fb26ae 2011-02-22 treeofsephiro: repo --name=rpmfusion-free --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-14&arch=i386 fc88fb26ae 2011-02-22 treeofsephiro: repo --name=rpmfusion-free-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=free-fedora-updates-released-14&arch=i386 fc88fb26ae 2011-02-22 treeofsephiro: repo --name=rpmfusion-nonfree --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-14&arch=i386 fc88fb26ae 2011-02-22 treeofsephiro: repo --name=rpmfusion-nonfree-updates --mirrorlist=http://mirrors.rpmfusion.org/mirrorlist?repo=nonfree-fedora-updates-released-14&arch=i386 fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #Adobe flash repos. Look, Gnash sucks. fc88fb26ae 2011-02-22 treeofsephiro: #We may want flashblock on firefox... although, a linux script needs to be made to do it. fc88fb26ae 2011-02-22 treeofsephiro: repo --name=adobe-linux-i386 --baseurl=http://linuxdownload.adobe.com/linux/i386/ fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #Tor repos. fc88fb26ae 2011-02-22 treeofsephiro: repo --name=tor --baseurl=http://deb.torproject.org/torproject.org/rpm/fc14/ fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Base Packages. fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: %packages fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: @base-x fc88fb26ae 2011-02-22 treeofsephiro: @base fc88fb26ae 2011-02-22 treeofsephiro: @core fc88fb26ae 2011-02-22 treeofsephiro: #@fonts # better to get only what's needed than include all of them fc88fb26ae 2011-02-22 treeofsephiro: @input-methods fc88fb26ae 2011-02-22 treeofsephiro: # use a small pinyin db for live fc88fb26ae 2011-02-22 treeofsephiro: -ibus-pinyin-db-open-phrase fc88fb26ae 2011-02-22 treeofsephiro: ibus-pinyin-db-android fc88fb26ae 2011-02-22 treeofsephiro: @admin-tools fc88fb26ae 2011-02-22 treeofsephiro: @dial-up fc88fb26ae 2011-02-22 treeofsephiro: @hardware-support fc88fb26ae 2011-02-22 treeofsephiro: @printing fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # Explicitly specified here: fc88fb26ae 2011-02-22 treeofsephiro: # <notting> walters: because otherwise dependency loops cause yum issues. fc88fb26ae 2011-02-22 treeofsephiro: kernel fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # This was added a while ago, I think it falls into the category of "Diagnosis/recovery tool useful from a Live OS image". Leaving this untouched for now. fc88fb26ae 2011-02-22 treeofsephiro: memtest86+ fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # The point of a live image is to install fc88fb26ae 2011-02-22 treeofsephiro: anaconda fc88fb26ae 2011-02-22 treeofsephiro: isomd5sum fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #---------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Fonts. If localizing, remember to add your own fonts if "Droid Sans" doesn't support that language. (Like, Hindi or Tibetian...) fc88fb26ae 2011-02-22 treeofsephiro: #---------------------------- fc88fb26ae 2011-02-22 treeofsephiro: liberation-mono-fonts fc88fb26ae 2011-02-22 treeofsephiro: liberation-sans-fonts fc88fb26ae 2011-02-22 treeofsephiro: liberation-serif-fonts fc88fb26ae 2011-02-22 treeofsephiro: google-droid-sans-fonts # Droid Sans is the best. fc88fb26ae 2011-02-22 treeofsephiro: google-droid-sans-mono-fonts fc88fb26ae 2011-02-22 treeofsephiro: google-droid-serif-fonts fc88fb26ae 2011-02-22 treeofsephiro: dejavu-sans-fonts fc88fb26ae 2011-02-22 treeofsephiro: dejavu-sans-mono-fonts fc88fb26ae 2011-02-22 treeofsephiro: dejavu-serif-fonts fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Standard packages for all Kickstarts. You can edit this. fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Security fc88fb26ae 2011-02-22 treeofsephiro: macchanger # FIXME: In order for macchanger to fc88fb26ae 2011-02-22 treeofsephiro: #-work, we need to set it to start on fc88fb26ae 2011-02-22 treeofsephiro: #-each boot. I have no idea how to do that. fc88fb26ae 2011-02-22 treeofsephiro: wipe fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #realcrypt # Sadly, screw realcrypt. The GUI fc88fb26ae 2011-02-22 treeofsephiro: #-doesn't work, and truecrypt files fc88fb26ae 2011-02-22 treeofsephiro: #-can't be mounted if they weren't made fc88fb26ae 2011-02-22 treeofsephiro: #-using realcrypt. Stay away. fc88fb26ae 2011-02-22 treeofsephiro: # Actually, mounting will work if you do this: http://fedoraforum.org/leigh123linux/badday_Screenshot.png fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: #We need to install actual Truecrypt somehow, like through a script. fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: steghide # Steghide allows you to encrypt info fc88fb26ae 2011-02-22 treeofsephiro: SteGUI # -in a picture or a wav. fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # Internet Security fc88fb26ae 2011-02-22 treeofsephiro: tor # FIXME: for vidalia to work, the Tor fc88fb26ae 2011-02-22 treeofsephiro: privoxy # -and Privoxy Daemons need to be turned off. fc88fb26ae 2011-02-22 treeofsephiro: vidalia fc88fb26ae 2011-02-22 treeofsephiro: # Someone help add an I2P RPM here... fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # internet browsers fc88fb26ae 2011-02-22 treeofsephiro: midori # It's runs as fast as Google Chrome, but #-with less of the, you know, creepy tracking. 5de4c2e714 2011-02-22 treeofsephiro: elinks # elinks is a light, initutive CLI browser. fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # I want SRWare Iron here, To do that, we need to install chromium, extract the contents of Iron's linux archive to "/usr/lib/", then make a link to it in "/usr/bin". fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # Other internetz fc88fb26ae 2011-02-22 treeofsephiro: claws-mail # I put claws-mail because it is safer than fc88fb26ae 2011-02-22 treeofsephiro: # -thunderbird, as it has support for tor. fc88fb26ae 2011-02-22 treeofsephiro: twinkle # SIP/VOIP Phone. It was put in polippix, fc88fb26ae 2011-02-22 treeofsephiro: #-so it's gotta be good. fc88fb26ae 2011-02-22 treeofsephiro: aircrack-ng fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # IRC fc88fb26ae 2011-02-22 treeofsephiro: irssi fc88fb26ae 2011-02-22 treeofsephiro: epic fc88fb26ae 2011-02-22 treeofsephiro: lostirc fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # office fc88fb26ae 2011-02-22 treeofsephiro: abiword # Lighter than Libre/OpenOffice. fc88fb26ae 2011-02-22 treeofsephiro: gnumeric fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # audio & video fc88fb26ae 2011-02-22 treeofsephiro: vlc # VLC or GXine? You choose. (Default is VLC) fc88fb26ae 2011-02-22 treeofsephiro: mozilla-vlc fc88fb26ae 2011-02-22 treeofsephiro: #gxine fc88fb26ae 2011-02-22 treeofsephiro: #gxine-mozplugin fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # system fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # Command line fc88fb26ae 2011-02-22 treeofsephiro: #wget # Is wget needed? Commented out. fc88fb26ae 2011-02-22 treeofsephiro: terminator # MOAR TERMINALZ, MOAR FUN. fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # Metadata wipers, to remove identifying info from created data. fc88fb26ae 2011-02-22 treeofsephiro: jhead #FIXME: We need one for PDF. fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: %end fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Scripts to run after install fc88fb26ae 2011-02-22 treeofsephiro: #------------------------------------------------------------------------- fc88fb26ae 2011-02-22 treeofsephiro: # Most of the below relate to making a livecd, so there probably isn't any need to edit this. Still, read them for a good example. fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: %post fc88fb26ae 2011-02-22 treeofsephiro: # This creates a script in /etc/rc.d/init.d/ to implement liveCD hacks. fc88fb26ae 2011-02-22 treeofsephiro: # FIXME: it'd be better to get this installed from a package fc88fb26ae 2011-02-22 treeofsephiro: cat > /etc/rc.d/init.d/livesys << EOF fc88fb26ae 2011-02-22 treeofsephiro: #!/bin/bash fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: # live: Init script for live image fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: # chkconfig: 345 00 99 fc88fb26ae 2011-02-22 treeofsephiro: # description: Init script for live image. fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: . /etc/init.d/functions fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then fc88fb26ae 2011-02-22 treeofsephiro: exit 0 fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: if [ -e /.liveimg-configured ] ; then fc88fb26ae 2011-02-22 treeofsephiro: configdone=1 fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: exists() { fc88fb26ae 2011-02-22 treeofsephiro: which \$1 >/dev/null 2>&1 || return fc88fb26ae 2011-02-22 treeofsephiro: \$* fc88fb26ae 2011-02-22 treeofsephiro: } fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: touch /.liveimg-configured fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # mount live image fc88fb26ae 2011-02-22 treeofsephiro: if [ -b \`readlink -f /dev/live\` ]; then fc88fb26ae 2011-02-22 treeofsephiro: mkdir -p /mnt/live fc88fb26ae 2011-02-22 treeofsephiro: mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: livedir="LiveOS" fc88fb26ae 2011-02-22 treeofsephiro: for arg in \`cat /proc/cmdline\` ; do fc88fb26ae 2011-02-22 treeofsephiro: if [ "\${arg##live_dir=}" != "\${arg}" ]; then fc88fb26ae 2011-02-22 treeofsephiro: livedir=\${arg##live_dir=} fc88fb26ae 2011-02-22 treeofsephiro: return fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: done fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # enable swaps unless requested otherwise fc88fb26ae 2011-02-22 treeofsephiro: swaps=\`blkid -t TYPE=swap -o device\` fc88fb26ae 2011-02-22 treeofsephiro: if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then fc88fb26ae 2011-02-22 treeofsephiro: for s in \$swaps ; do fc88fb26ae 2011-02-22 treeofsephiro: action "Enabling swap partition \$s" swapon \$s fc88fb26ae 2011-02-22 treeofsephiro: done fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /mnt/live/\${livedir}/swap.img ] ; then fc88fb26ae 2011-02-22 treeofsephiro: action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: mountPersistentHome() { fc88fb26ae 2011-02-22 treeofsephiro: # support label/uuid fc88fb26ae 2011-02-22 treeofsephiro: if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then fc88fb26ae 2011-02-22 treeofsephiro: homedev=\`/sbin/blkid -o device -t "\$homedev"\` fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # if we're given a file rather than a blockdev, loopback it fc88fb26ae 2011-02-22 treeofsephiro: if [ "\${homedev##mtd}" != "\${homedev}" ]; then fc88fb26ae 2011-02-22 treeofsephiro: # mtd devs don't have a block device but get magic-mounted with -t jffs2 fc88fb26ae 2011-02-22 treeofsephiro: mountopts="-t jffs2" fc88fb26ae 2011-02-22 treeofsephiro: elif [ ! -b "\$homedev" ]; then fc88fb26ae 2011-02-22 treeofsephiro: loopdev=\`losetup -f\` fc88fb26ae 2011-02-22 treeofsephiro: if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then fc88fb26ae 2011-02-22 treeofsephiro: action "Remounting live store r/w" mount -o remount,rw /mnt/live fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: losetup \$loopdev \$homedev fc88fb26ae 2011-02-22 treeofsephiro: homedev=\$loopdev fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # if it's encrypted, we need to unlock it fc88fb26ae 2011-02-22 treeofsephiro: if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then fc88fb26ae 2011-02-22 treeofsephiro: echo fc88fb26ae 2011-02-22 treeofsephiro: echo "Setting up encrypted /home device" fc88fb26ae 2011-02-22 treeofsephiro: plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome" fc88fb26ae 2011-02-22 treeofsephiro: homedev=/dev/mapper/EncHome fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # and finally do the mount fc88fb26ae 2011-02-22 treeofsephiro: mount \$mountopts \$homedev /home fc88fb26ae 2011-02-22 treeofsephiro: # if we have /home under what's passed for persistent home, then fc88fb26ae 2011-02-22 treeofsephiro: # we should make that the real /home. useful for mtd device on olpc fc88fb26ae 2011-02-22 treeofsephiro: if [ -d /home/home ]; then mount --bind /home/home /home ; fi fc88fb26ae 2011-02-22 treeofsephiro: [ -x /sbin/restorecon ] && /sbin/restorecon /home fc88fb26ae 2011-02-22 treeofsephiro: if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi fc88fb26ae 2011-02-22 treeofsephiro: } fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: findPersistentHome() { fc88fb26ae 2011-02-22 treeofsephiro: for arg in \`cat /proc/cmdline\` ; do fc88fb26ae 2011-02-22 treeofsephiro: if [ "\${arg##persistenthome=}" != "\${arg}" ]; then fc88fb26ae 2011-02-22 treeofsephiro: homedev=\${arg##persistenthome=} fc88fb26ae 2011-02-22 treeofsephiro: return fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: done fc88fb26ae 2011-02-22 treeofsephiro: } fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: if strstr "\`cat /proc/cmdline\`" persistenthome= ; then fc88fb26ae 2011-02-22 treeofsephiro: findPersistentHome fc88fb26ae 2011-02-22 treeofsephiro: elif [ -e /mnt/live/\${livedir}/home.img ]; then fc88fb26ae 2011-02-22 treeofsephiro: homedev=/mnt/live/\${livedir}/home.img fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # if we have a persistent /home, then we want to go ahead and mount it fc88fb26ae 2011-02-22 treeofsephiro: if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then fc88fb26ae 2011-02-22 treeofsephiro: action "Mounting persistent /home" mountPersistentHome fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # make it so that we don't do writing to the overlay for things which fc88fb26ae 2011-02-22 treeofsephiro: # are just tmpdirs/caches fc88fb26ae 2011-02-22 treeofsephiro: mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum fc88fb26ae 2011-02-22 treeofsephiro: mount -t tmpfs tmp /tmp fc88fb26ae 2011-02-22 treeofsephiro: mount -t tmpfs vartmp /var/tmp fc88fb26ae 2011-02-22 treeofsephiro: [ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1 fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: if [ -n "\$configdone" ]; then fc88fb26ae 2011-02-22 treeofsephiro: exit 0 fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # add fedora user with no passwd fc88fb26ae 2011-02-22 treeofsephiro: action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser fc88fb26ae 2011-02-22 treeofsephiro: passwd -d liveuser > /dev/null fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # turn off firstboot for livecd boots fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 firstboot off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: # We made firstboot a native systemd service, so it can no longer be turned fc88fb26ae 2011-02-22 treeofsephiro: # off with chkconfig. It should be possible to turn it off with systemctl, but fc88fb26ae 2011-02-22 treeofsephiro: # that doesn't work right either. For now, this is good enough: the firstboot fc88fb26ae 2011-02-22 treeofsephiro: # service will start up, but this tells it not to run firstboot. I suspect the fc88fb26ae 2011-02-22 treeofsephiro: # other services 'disabled' below are not actually getting disabled properly, fc88fb26ae 2011-02-22 treeofsephiro: # with systemd, but we can look into that later. - AdamW 2010/08 F14Alpha fc88fb26ae 2011-02-22 treeofsephiro: echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # don't start yum-updatesd for livecd boots fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 yum-updatesd off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # turn off mdmonitor by default fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 mdmonitor off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # turn off setroubleshoot on the live image to preserve resources fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 setroubleshoot off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # don't do packagekit checking by default fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_updates never >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_upgrades never >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_refresh_cache never >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_available false >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_distro_upgrades false >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_mime_type_helper false >/dev/null fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # don't start cron/at as they tend to spawn things which are fc88fb26ae 2011-02-22 treeofsephiro: # disk intensive that are painful on a live image fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 crond off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 atd off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 anacron off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 readahead_early off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: chkconfig --level 345 readahead_later off 2>/dev/null fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # Stopgap fix for RH #217966; should be fixed in HAL instead fc88fb26ae 2011-02-22 treeofsephiro: touch /media/.hal-mtab fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # workaround clock syncing on shutdown that we don't want (#297421) fc88fb26ae 2011-02-22 treeofsephiro: sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # and hack so that we eject the cd on shutdown if we're using a CD... fc88fb26ae 2011-02-22 treeofsephiro: if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then fc88fb26ae 2011-02-22 treeofsephiro: cat >> /sbin/halt.local << FOE fc88fb26ae 2011-02-22 treeofsephiro: #!/bin/bash fc88fb26ae 2011-02-22 treeofsephiro: # XXX: This often gets stuck during shutdown because /etc/init.d/halt fc88fb26ae 2011-02-22 treeofsephiro: # (or something else still running) wants to read files from the block\ fc88fb26ae 2011-02-22 treeofsephiro: # device that was ejected. Disable for now. Bug #531924 fc88fb26ae 2011-02-22 treeofsephiro: # we want to eject the cd on halt, but let's also try to avoid fc88fb26ae 2011-02-22 treeofsephiro: # io errors due to not being able to get files... fc88fb26ae 2011-02-22 treeofsephiro: #cat /sbin/halt > /dev/null fc88fb26ae 2011-02-22 treeofsephiro: #cat /sbin/reboot > /dev/null fc88fb26ae 2011-02-22 treeofsephiro: #/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1 fc88fb26ae 2011-02-22 treeofsephiro: #echo "Please remove the CD from your drive and press Enter to finish restarting" fc88fb26ae 2011-02-22 treeofsephiro: #read -t 30 < /dev/console fc88fb26ae 2011-02-22 treeofsephiro: FOE fc88fb26ae 2011-02-22 treeofsephiro: chmod +x /sbin/halt.local fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: EOF fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # bah, hal starts way too late fc88fb26ae 2011-02-22 treeofsephiro: # This script runs after the above one fc88fb26ae 2011-02-22 treeofsephiro: cat > /etc/rc.d/init.d/livesys-late << EOF fc88fb26ae 2011-02-22 treeofsephiro: #!/bin/bash fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: # live: Late init script for live image fc88fb26ae 2011-02-22 treeofsephiro: # fc88fb26ae 2011-02-22 treeofsephiro: # chkconfig: 345 99 01 fc88fb26ae 2011-02-22 treeofsephiro: # description: Late init script for live image. fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: . /etc/init.d/functions fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then fc88fb26ae 2011-02-22 treeofsephiro: exit 0 fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: exists() { fc88fb26ae 2011-02-22 treeofsephiro: which \$1 >/dev/null 2>&1 || return fc88fb26ae 2011-02-22 treeofsephiro: \$* fc88fb26ae 2011-02-22 treeofsephiro: } fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: touch /.liveimg-late-configured fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # read some variables out of /proc/cmdline fc88fb26ae 2011-02-22 treeofsephiro: for o in \`cat /proc/cmdline\` ; do fc88fb26ae 2011-02-22 treeofsephiro: case \$o in fc88fb26ae 2011-02-22 treeofsephiro: ks=*) fc88fb26ae 2011-02-22 treeofsephiro: ks="--kickstart=\${o#ks=}" fc88fb26ae 2011-02-22 treeofsephiro: ;; fc88fb26ae 2011-02-22 treeofsephiro: xdriver=*) fc88fb26ae 2011-02-22 treeofsephiro: xdriver="\${o#xdriver=}" fc88fb26ae 2011-02-22 treeofsephiro: ;; fc88fb26ae 2011-02-22 treeofsephiro: esac fc88fb26ae 2011-02-22 treeofsephiro: done fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # if liveinst or textinst is given, start anaconda fc88fb26ae 2011-02-22 treeofsephiro: if strstr "\`cat /proc/cmdline\`" liveinst ; then fc88fb26ae 2011-02-22 treeofsephiro: plymouth --quit fc88fb26ae 2011-02-22 treeofsephiro: /usr/sbin/liveinst \$ks fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: if strstr "\`cat /proc/cmdline\`" textinst ; then fc88fb26ae 2011-02-22 treeofsephiro: plymouth --quit fc88fb26ae 2011-02-22 treeofsephiro: /usr/sbin/liveinst --text \$ks fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # configure X, allowing user to override xdriver fc88fb26ae 2011-02-22 treeofsephiro: if [ -n "\$xdriver" ]; then fc88fb26ae 2011-02-22 treeofsephiro: cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE fc88fb26ae 2011-02-22 treeofsephiro: Section "Device" fc88fb26ae 2011-02-22 treeofsephiro: Identifier "Videocard0" fc88fb26ae 2011-02-22 treeofsephiro: Driver "\$xdriver" fc88fb26ae 2011-02-22 treeofsephiro: EndSection fc88fb26ae 2011-02-22 treeofsephiro: FOE fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: EOF fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # The below makes the created scripts usable fc88fb26ae 2011-02-22 treeofsephiro: chmod 755 /etc/rc.d/init.d/livesys fc88fb26ae 2011-02-22 treeofsephiro: /sbin/restorecon /etc/rc.d/init.d/livesys fc88fb26ae 2011-02-22 treeofsephiro: /sbin/chkconfig --add livesys fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: chmod 755 /etc/rc.d/init.d/livesys-late fc88fb26ae 2011-02-22 treeofsephiro: /sbin/restorecon /etc/rc.d/init.d/livesys-late fc88fb26ae 2011-02-22 treeofsephiro: /sbin/chkconfig --add livesys-late fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # work around for poor key import UI in PackageKit fc88fb26ae 2011-02-22 treeofsephiro: rm -f /var/lib/rpm/__db* fc88fb26ae 2011-02-22 treeofsephiro: rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora fc88fb26ae 2011-02-22 treeofsephiro: echo "Packages within this LiveCD" fc88fb26ae 2011-02-22 treeofsephiro: rpm -qa fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # go ahead and pre-make the man -k cache (#455968) fc88fb26ae 2011-02-22 treeofsephiro: /usr/bin/mandb fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # save a little bit of space at least... fc88fb26ae 2011-02-22 treeofsephiro: rm -f /boot/initramfs* fc88fb26ae 2011-02-22 treeofsephiro: # make sure there aren't core files lying around fc88fb26ae 2011-02-22 treeofsephiro: rm -f /core* fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # convince readahead not to collect fc88fb26ae 2011-02-22 treeofsephiro: rm -f /.readahead_collect fc88fb26ae 2011-02-22 treeofsephiro: touch /var/lib/readahead/early.sorted fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: %end fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: %post --nochroot fc88fb26ae 2011-02-22 treeofsephiro: # This copies the GPL to /usr/share/doc of the LiveCD's directory. fc88fb26ae 2011-02-22 treeofsephiro: cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: # only works on x86, x86_64 fc88fb26ae 2011-02-22 treeofsephiro: if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then fc88fb26ae 2011-02-22 treeofsephiro: if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi fc88fb26ae 2011-02-22 treeofsephiro: cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS fc88fb26ae 2011-02-22 treeofsephiro: fi fc88fb26ae 2011-02-22 treeofsephiro: %end fc88fb26ae 2011-02-22 treeofsephiro: fc88fb26ae 2011-02-22 treeofsephiro: