diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-03-13 21:15:09 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-03-13 21:15:09 +0100 |
commit | 06e6aa5d5eaa01ff7a371a66c88da8568f7f7e68 (patch) | |
tree | 5918fe64096a13a7a1da73e2125d0308885b0cea /examples | |
parent | d120e407654b5f1c88cb146511b9439b80190bb7 (diff) |
uniformize variable handling automatic procedure, change the package related variable stuff, support choosing grub device in automatic, fix grub installing bug, cleanup official vs dieters stuff, etc
Diffstat (limited to 'examples')
-rw-r--r-- | examples/deployconfig-dieter | 130 | ||||
-rw-r--r-- | examples/generic-install-on-sda | 25 |
2 files changed, 15 insertions, 140 deletions
diff --git a/examples/deployconfig-dieter b/examples/deployconfig-dieter deleted file mode 100644 index a866d54..0000000 --- a/examples/deployconfig-dieter +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash -# An example config for the deployment procedure - -# Use var_* for "standard" variables recognized by the automatic procedure. these should work for everyone. -# use all other variable names for your own stuff. (eg i use them to define some things needed to pull my stuff from svn.) - -# TODO: install ruby-gems too -# TODO * dieter/automatic: wait for yaourt --config fix ( http://forums.archlinux.fr/post23171.html#23171 ) -# TODO:* dieter/automatic: put config files from svn in place first, so that if a package has an update, it can do it's thing. - - -var_RUNTIME_REPOSITORIES=(archlinuxfr "Server = http://repo.archlinux.fr/$var_ARCH") -var_RUNTIME_PACKAGES="svn yaourt" - -DEPLOY_CLASS=desktop-a7n8x -HOSTNAME=dieter-ws -SVN_USERNAME=dieter -SVN_PASSWORD= -SVN_BASE=https://192.168.1.2/svn/repos - -var_PARTITIONS='/dev/sda 100:ext2:+ 2048:swap *:xfs' -var_BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params -/dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params -/dev/sda3 raw no_label dm_crypt;yes;no_mountpoint;target;no_opts;sda3crypt;-c_aes-xts-plain_-y_-s_512 -/dev/mapper/sda3crypt dm_crypt no_label lvm-pv;yes;no_mountpoint;target;no_opts;no_label;no_params -/dev/mapper/sda3crypt+ lvm-pv no_label lvm-vg;yes;no_mountpoint;target;no_opts;cryptpool;/dev/mapper/sda3crypt -/dev/mapper/cryptpool lvm-vg cryptpool lvm-lv;yes;no_mountpoint;target;no_opts;cryptroot;5G|lvm-lv;yes;no_mountpoint;target;no_opts;crypthome;5G -/dev/mapper/cryptpool-cryptroot lvm-lv no_label xfs;yes;/;target;no_opts;no_label;no_params -/dev/mapper/cryptpool-crypthome lvm-lv no_label xfs;yes;/home;target;no_opts;no_label;no_params' - - - -phase_preparation=(accept_ssl_cert "${phase_preparation[@]}") # make accept_ssl_cert the very first thing. it needs to go before fetch_configs and it's not easy to put it somewhere in the middle, so... -phase_system+=(configure_home) - - -# Deprecated. I try to keep everything in 1 config file now. that's cooler. -#worker_fetch_configs () -#{ -# $SVN export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.blockdata $RUNTIME_DIR/aif-blockdata || die_error "Could not svn export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.blockdata to $RUNTIME_DIR/aif-blockdata" -# $SVN export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.partitions $RUNTIME_DIR/aif-partitions || die_error "Could not svn export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/disks/.partitions to $RUNTIME_DIR/aif-partitions" -#} - - - -worker_package_list () -{ - $SVN export $SVN_BASE/ddm-configs/$DEPLOY_CLASS/trunk/package-list $var_PKG_FILE || die_error "Could not export package list!" - # cat -> there are newlines in it -> var=`echo $var` -> not anymore :) - TARGET_PACKAGES=`cat $var_PKG_FILE` && TARGET_PACKAGES=`echo $TARGET_PACKAGES` || die_error "Could not cat package list. THIS SHOULD NEVER HAPPEN." - # Strip away all packages not known by pacman. To get all packages, you'll need to do that when the system is installed TODO: don't do this. WAITINGFOR: --config support in yaourt + 'list of md5s of trusted pkgbuilds' support in yaourt - # NOTE: maybe chrooting could be an option too (to avoid --config support, but problem 2 stays) - TARGET_PACKAGES=`$PACMAN_TARGET -Si $TARGET_PACKAGES 2>/dev/null | awk '/Name/ {print $3}'` - TARGET_PACKAGES=`echo $TARGET_PACKAGES` #TODO: some stuff goes wrong here -} - - -worker_accept_ssl_cert () -{ - mkdir -p /root/.subversion/auth/svn.ssl.server - cat > /root/.subversion/auth/svn.ssl.server/1123d3c8b27895efee3848cc779e526a << EOF -K 10 -ascii_cert -V 716 -MIICFTCCAX6gAwIBAgIBAjANBgkqhkiG9w0BAQQFADBVMRswGQYDVQQKExJBcGFjaGUgSFRUUCBTZXJ2ZXIxIjAgBgNVBAsTGUZvciB0ZXN0aW5nIHB1cnBvc2VzIG9ubHkxEjAQBgNVBAMTCWxvY2FsaG9zdDAeFw0wNjA3MjQxMjUwMzdaFw0wNzA3MjQxMjUwMzdaMEwxGzAZBgNVBAoTEkFwYWNoZSBIVFRQIFNlcnZlcjEZMBcGA1UECxMQVGVzdCBDZXJ0aWZpY2F0ZTESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDF5PB1NnUve2jkisDTGsxKC9qzpnl+eX8UIR/1s+yX2ZIPNnIryeqTc6sS3cBHz2/AufIr0xbpXkTa4V5Es5bXA7W1D7+ZzuFHjjyi4E2eqYVkhkv1sRL5TpAovfjAA+96iaFHp3yKYiuw/nWwQTSW9M1VrDEym4ODxyJOtNdgQQIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABY0bnBf9tL1WMC1sLxB1eDXvs5qNY96mny+EKGAbyQROPaXwsRQB0HrAkuWfHzQlgIdD6AfGsd+YMcEuqSPzIz6t6mA45jl++WvI6we9t3eYChtdPD2xjgHti0aSiDyVLTJbXPnkdgzKvIjYZcXBwbmbQSrg0STO5m+cSYt3chx -K 8 -failures -V 2 -14 -K 15 -svn:realmstring -V 23 -https://192.168.1.2:443 -END -EOF -} - - -worker_configure_home () -{ - #TODO checkout from svn - true -} - - - -# See http://wiki.archlinux.org/index.php/Yaourt - -# Not needed yet... -#worker_install_packages () #pre_ / post_ callbacks would be useful here -#{ -# PACMAN_BACKUP=$PACMAN -# PACMAN_TARGET_BACKUP=$PACMAN_TARGET -# PACMAN=${PACMAN//pacman/yaourt} -# PACMAN_TARGET=${PACMAN_TARGET//pacman/yaourt} - -# target_prepare_pacman core -# [ -z "$TARGET_PACKAGES" ] && die_error "No packages listed to be installed!" -# installpkg - -# PACMAN=$PACMAN_BACKUP -# PACMAN_TARGET=$PACMAN_TARGET_BACKUP -#} - - -# Check if we have all needed settings loaded from the profile -post_worker_configure () -{ - if check_is_in svn $var_RUNTIME_PACKAGES - then - [ -z "$SVN_USERNAME" ] && ask_string "Please enter your svn username" && SVN_USERNAME=$ANSWER_STRING - [ -z "$SVN_PASSWORD" ] && ask_password svn #TODO: if user entered incorrect password, the install process will just fail.. - [ -z "$SVN_BASE" ] && ask_string "What's the base path of your svn repo? (no ending /) " && SVN_BASE=$ANSWER_STRING - [ -z "$DEPLOY_CLASS" ] && ask_string "Which hostclass are you installing? (optional)" '' 0 && DEPLOY_CLASS=$ANSWER_STRING - SVN="svn --username $SVN_USERNAME --password $SVN_PASSWORD" - elif check_is_in moo $var_RUNTIME_PACKAGES - then - # Maybe more stuff later - true - fi - [ -z "$HOSTNAME" ] && ask_string "Hostname of target system?" && HOSTNAME=$ANSWER_STRING - - return 0 -} - -worker_set_clock () -{ - #Not doing anything. hwclock is set already, configs are coming from svn anyway and we'll use ntp. - true -} diff --git a/examples/generic-install-on-sda b/examples/generic-install-on-sda index 0afdea5..9d25776 100644 --- a/examples/generic-install-on-sda +++ b/examples/generic-install-on-sda @@ -1,23 +1,28 @@ -# these variables are defaults, but it doesn't hurt to define them. +# these variables are optional, here are the defaults (feel free to omit them) -AUTOMATIC_SOURCE=cd -AUTOMATIC_FILE_URL=file:///src/core/pkg -AUTOMATIC_SYNC_URL= +SOURCE=cd +FILE_URL=file:///src/core/pkg +SYNC_URL= # Do you want to have additional pacman repositories or packages available at runtime (during installation)? -AUTOMATIC_RUNTIME_REPOSITORIES= -AUTOMATIC_RUNTIME_PACKAGES= +RUNTIME_REPOSITORIES= +RUNTIME_PACKAGES= # packages to install -TARGET_GROUPS=base #all packages in this group will be installed -TARGET_PACKAGES=openssh # you can also specify separate packages +TARGET_GROUPS=base #all packages in this group will be installed (defaults to base if no group and no packages are specified) +TARGET_PACKAGES=openssh # you can also specify separate packages (this is empty by default) +# you can optionally also override some functions... worker_intro () { infofy "Automatic procedure running the generic-install-on-sda example config. THIS WILL ERASE AND OVERWRITE YOUR /DEV/SDA. IF YOU DO NOT WANT THIS PRESS CTRL+C WITHIN 10 SECONDS" sleep 10 } -var_PARTITIONS='/dev/sda 100:ext2:+ 512:swap *:ext4' -var_BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params + +# These variables are mandatory + +GRUB_DEVICE=/dev/sda +PARTITIONS='/dev/sda 100:ext2:+ 512:swap *:ext4' +BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params /dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params /dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
\ No newline at end of file |