1: #version=F12
     2: # Firewall configuration
     3: ### todo: see if this can be removed without complications
     4: ### viros: traits are responsible for locking down
     5: ###firewall --enabled --service=mdns
     6: firewall --disabled
     7: # X Window System configuration information
     8: xconfig  --startxonboot
     9: ### todo: own cgi in mirrors that responds appropriately
    10: ###repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-12&arch=$basearch
    11: ###repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f12&arch=$basearch
    12: repo --name=released --baseurl=http://mirrors1.kernel.org/fedora/releases/12/Everything/i386/os
    13: ### viros: todo experiment: should not be necessary to hide this but...
    14: ###repo --name=updates --baseurl=http://mirrors1.kernel.org/fedora/updates/12/i386
    15: # System authorization information
    16: auth --useshadow --enablemd5
    17: # System keyboard
    18: keyboard us
    19: 
    20: ########include fedora-live-base.ks
    21: # System language
    22: lang en_US.UTF-8
    23: # SELinux configuration
    24: selinux --enforcing
    25: # Installation logging level
    26: logging --level=info
    27: 
    28: # System services
    29: ### handled in vml traits
    30: ###services --disabled="network,sshd" --enabled="NetworkManager"
    31: ###services  --disabled="network,sshd,nfs,nfslock" --enabled="NetworkManager"
    32: # System timezone
    33: ###timezone  US/Eastern
    34: timezone  America/Denver
    35: # Disk partitioning information
    36: ### todo: make this settable in .vml as a synthopt
    37: # note: unsure if --grow --asprimary --ondisk=sda are really needed
    38: ###part / --fstype="ext4" --size=3072
    39: part /  --fstype="ext3" --size=4096 --grow --asprimary --ondisk=sda
    40: 
    41: %post
    42: # FIXME: it'd be better to get this installed from a package
    43: cat > /etc/rc.d/init.d/livesys << EOF
    44: #!/bin/bash
    45: #
    46: # live: Init script for live image
    47: #
    48: #### chkconfig: 345 00 99
    49: # chkconfig: 345 00 98
    50: # description: Init script for live image.
    51: 
    52: . /etc/init.d/functions
    53: 
    54: if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
    55:     exit 0
    56: fi
    57: 
    58: if [ -e /.liveimg-configured ] ; then
    59:     configdone=1
    60: fi
    61: 
    62: exists() {
    63:     which \$1 >/dev/null 2>&1 || return
    64:     \$*
    65: }
    66: 
    67: touch /.liveimg-configured
    68: 
    69: 
    70: livedir="LiveOS"
    71: for arg in \`cat /proc/cmdline\` ; do
    72:   if [ "\${arg##live_dir=}" != "\${arg}" ]; then
    73:     livedir=\${arg##live_dir=}
    74:     return
    75:   fi
    76: done
    77: 
    78: #v
    79: # enable swaps if requested
    80: swaps=\`blkid -t TYPE=swap -o device\`
    81: if strstr "\`cat /proc/cmdline\`" swap && [ -n "\$swaps" ] ; then
    82:   for s in \$swaps ; do
    83:     action "Enabling swap partition \$s" swapon \$s
    84:   done
    85: fi
    86: if strstr "\`cat /proc/cmdline\`" swap && [ -f /mnt/live/\${livedir}/swap.img ] ; then
    87:   action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img
    88: fi
    89: 
    90: mountPersistentHome() {
    91:   # support label/uuid
    92:   if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
    93:     homedev=\`/sbin/blkid -o device -t "\$homedev"\`
    94:   fi
    95: 
    96:   # if we're given a file rather than a blockdev, loopback it
    97:   if [ "\${homedev##mtd}" != "\${homedev}" ]; then
    98:     # mtd devs don't have a block device but get magic-mounted with -t jffs2
    99:     mountopts="-t jffs2"
   100:   elif [ ! -b "\$homedev" ]; then
   101:     loopdev=\`losetup -f\`
   102:     if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then
   103:       action "Remounting live store r/w" mount -o remount,rw /mnt/live
   104:     fi
   105:     losetup \$loopdev \$homedev
   106:     homedev=\$loopdev
   107:   fi
   108: 
   109:   # if it's encrypted, we need to unlock it
   110:   if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
   111:     echo
   112:     echo "Setting up encrypted /home device"
   113:     plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
   114:     homedev=/dev/mapper/EncHome
   115:   fi
   116: 
   117:   # and finally do the mount
   118:   mount \$mountopts \$homedev /home
   119:   # if we have /home under what's passed for persistent home, then
   120:   # we should make that the real /home.  useful for mtd device on olpc
   121:   if [ -d /home/home ]; then mount --bind /home/home /home ; fi
   122:   [ -x /sbin/restorecon ] && /sbin/restorecon /home
   123:   if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
   124: }
   125: 
   126: findPersistentHome() {
   127:   for arg in \`cat /proc/cmdline\` ; do
   128:     if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
   129:       homedev=\${arg##persistenthome=}
   130:       return
   131:     fi
   132:   done
   133: }
   134: 
   135: if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
   136:   findPersistentHome
   137: elif [ -e /mnt/live/\${livedir}/home.img ]; then
   138:   homedev=/mnt/live/\${livedir}/home.img
   139: fi
   140: 
   141: # if we have a persistent /home, then we want to go ahead and mount it
   142: if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
   143:   action "Mounting persistent /home" mountPersistentHome
   144: fi
   145: 
   146: 
   147: if [ -n "\$configdone" ]; then
   148:   exit 0
   149: fi
   150: 
   151: 
   152: EOF
   153: 
   154: chmod 755 /etc/rc.d/init.d/livesys
   155: /sbin/restorecon /etc/rc.d/init.d/livesys
   156: /sbin/chkconfig --add livesys
   157: 
   158: # work around for poor key import UI in PackageKit
   159: rm -f /var/lib/rpm/__db*
   160: rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
   161: 
   162: # go ahead and pre-make the man -k cache (#455968)
   163: /usr/sbin/makewhatis -w
   164: 
   165: %end
   166: 
   167: 
   168: %packages
   169: @admin-tools
   170: @base
   171: @base-x
   172: @core
   173: @dial-up
   174: @fonts
   175: @games
   176: @gnome-desktop
   177: @graphical-internet
   178: @hardware-support
   179: @input-methods
   180: @printing
   181: @sound-and-video
   182: NetworkManager-openvpn
   183: NetworkManager-vpnc
   184: abiword
   185: anaconda
   186: cheese
   187: festival
   188: festvox-slt-arctic-hts
   189: isomd5sum
   190: kernel
   191: memtest86+
   192: nss-mdns
   193: sendmail
   194: xz-lzma-compat
   195: -a2ps
   196: -acpid
   197: -alacarte
   198: -aspell-*
   199: -autofs
   200: -ccid
   201: -compat*
   202: -constantine-backgrounds-extras
   203: -coolkey
   204: -dasher
   205: -desktop-backgrounds-basic
   206: -ekiga
   207: -esc
   208: -evince-djvu
   209: -evince-dvi
   210: -evolution-help
   211: -finger
   212: -ftp
   213: -gnome-games-help
   214: -gnome-user-docs
   215: -hpijs
   216: -hplip
   217: -hunspell-*
   218: -isdn4k-utils
   219: -jwhois
   220: -krb5-auth-dialog
   221: -krb5-workstation
   222: -lzma
   223: -minicom
   224: -mpage
   225: -mtr
   226: -nfs-utils
   227: -nss_db
   228: -numactl
   229: -pam_krb5
   230: -pinfo
   231: -policycoreutils-gui
   232: -ql2100-firmware
   233: -ql2200-firmware
   234: -ql23xx-firmware
   235: -ql2400-firmware
   236: -quota
   237: -redhat-lsb
   238: -rpcbind
   239: -rsh
   240: -samba-client
   241: -sane-backends
   242: -seahorse
   243: -smartmontools
   244: -specspo
   245: -tomboy
   246: wget
   247: -words
   248: -xsane
   249: -xsane-gimp
   250: -yp-tools
   251: -ypbind
   252: 
   253: %end
   254: