summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/lib-blockdevices-filesystems.sh116
-rw-r--r--src/profiles/profile-dieter26
2 files changed, 88 insertions, 54 deletions
diff --git a/src/lib/lib-blockdevices-filesystems.sh b/src/lib/lib-blockdevices-filesystems.sh
index 182c4a2..6c3921a 100644
--- a/src/lib/lib-blockdevices-filesystems.sh
+++ b/src/lib/lib-blockdevices-filesystems.sh
@@ -30,10 +30,10 @@ target_special_fs ()
# the destination root partition last!
target_umountall()
{
- DIALOG --infobox "Disabling swapspace, unmounting already mounted disk devices..." 0 0
- swapoff -a >/dev/null 2>&1
- umount $(mount | grep -v "${TARGET_DIR} " | grep "${TARGET_DIR}" | sed 's|\ .*||g') >/dev/null 2>&1
- umount $(mount | grep "${TARGET_DIR} " | sed 's|\ .*||g') >/dev/null 2>&1
+ notify "Disabling swapspace, unmounting already mounted disk devices..."
+ swapoff -a >/dev/null 2>&1
+ umount $(mount | grep -v "${TARGET_DIR} " | grep "${TARGET_DIR}" | sed 's|\ .*||g') >/dev/null 2>&1
+ umount $(mount | grep "${TARGET_DIR} " | sed 's|\ .*||g') >/dev/null 2>&1
}
@@ -91,51 +91,62 @@ getuuid()
# taken from setup. slightly optimized. TODO: fix identation + can be improved more
findpartitions() {
- workdir="$PWD"
- for devpath in $(finddisks); do
- disk=$(echo $devpath | sed 's|.*/||')
- cd /sys/block/$disk
- for part in $disk*; do
- # check if not already assembled to a raid device
- if ! [ "$(cat /proc/mdstat 2>/dev/null | grep $part)" -o "$(fstype 2>/dev/null </dev/$part | grep "lvm2")" \
- -o "$(sfdisk -c /dev/$disk $(echo $part | sed -e "s#$disk##g") 2>/dev/null | grep "5")" ]
- then
- if [ -d $part ]; then
- echo "/dev/$part"
- [ "$1" ] && echo $1
- fi
- fi
- done
- done
- # include any mapped devices
- for devpath in $(ls /dev/mapper 2>/dev/null | grep -v control); do
- echo "/dev/mapper/$devpath"
- [ "$1" ] && echo $1
- done
- # include any raid md devices
- for devpath in $(ls -d /dev/md* | grep '[0-9]' 2>/dev/null); do
- if grep -qw $(echo $devpath /proc/mdstat | sed -e 's|/dev/||g'); then
- echo "$devpath"
- [ "$1" ] && echo $1
- fi
- done
- # inlcude cciss controllers
- if [ -d /dev/cciss ] ; then
- cd /dev/cciss
- for dev in $(ls | egrep 'p'); do
- echo "/dev/cciss/$dev"
- [ "$1" ] && echo $1
- done
- fi
- # inlcude Smart 2 controllers
- if [ -d /dev/ida ] ; then
- cd /dev/ida
- for dev in $(ls | egrep 'p'); do
- echo "/dev/ida/$dev"
- [ "$1" ] && echo $1
- done
- fi
- cd "$workdir"
+ workdir="$PWD"
+ for devpath in $(finddisks)
+ do
+ disk=$(echo $devpath | sed 's|.*/||')
+ cd /sys/block/$disk
+ for part in $disk*
+ do
+ # check if not already assembled to a raid device
+ if ! [ "$(cat /proc/mdstat 2>/dev/null | grep $part)" -o "$(fstype 2>/dev/null </dev/$part | grep "lvm2")" \
+ -o "$(sfdisk -c /dev/$disk $(echo $part | sed -e "s#$disk##g") 2>/dev/null | grep "5")" ]
+ then
+ if [ -d $part ]
+ then
+ echo "/dev/$part"
+ [ "$1" ] && echo $1
+ fi
+ fi
+ done
+ done
+ # include any mapped devices
+ for devpath in $(ls /dev/mapper 2>/dev/null | grep -v control)
+ do
+ echo "/dev/mapper/$devpath"
+ [ "$1" ] && echo $1
+ done
+ # include any raid md devices
+ for devpath in $(ls -d /dev/md* | grep '[0-9]' 2>/dev/null)
+ do
+ if grep -qw $(echo $devpath /proc/mdstat | sed -e 's|/dev/||g')
+ then
+ echo "$devpath"
+ [ "$1" ] && echo $1
+ fi
+ done
+ # inlcude cciss controllers
+ if [ -d /dev/cciss ]
+ then
+ cd /dev/cciss
+ for dev in $(ls | egrep 'p')
+ do
+ echo "/dev/cciss/$dev"
+ [ "$1" ] && echo $1
+ done
+ fi
+ # inlcude Smart 2 controllers
+ if [ -d /dev/ida ]
+ then
+ cd /dev/ida
+ for dev in $(ls | egrep 'p')
+ do
+ echo "/dev/ida/$dev"
+ [ "$1" ] && echo $1
+ done
+ fi
+
+ cd "$workdir"
}
@@ -148,6 +159,7 @@ EOF
}
+# TODO: $1 is what??
# taken from setup. slightly edited.
mapdev() {
partition_flag=0
@@ -185,7 +197,7 @@ mapdev() {
fi
}
-# _mkfs() taken from setup code and slightly improved. TODO: decouple GUI code, improve more
+# _mkfs() taken from setup code and slightly improved.
# Create and mount filesystems in our destination system directory.
#
# args:
@@ -207,9 +219,9 @@ _mkfs() {
if [ "${_fstype}" = "swap" ]; then
swapoff ${_device} >/dev/null 2>&1
if [ "${_domk}" = "yes" ]; then
- mkswap ${_device} >$LOG 2>&1 || DIALOG --msgbox "Error creating swap: mkswap ${_device}" 0 0 && return 1
+ mkswap ${_device} >$LOG 2>&1 || show_warning "Error creating swap: mkswap ${_device}" && return 1
fi
- swapon ${_device} >$LOG 2>&1 || DIALOG --msgbox "Error activating swap: swapon ${_device}" 0 0 && return 1
+ swapon ${_device} >$LOG 2>&1 || show_warning "Error activating swap: swapon ${_device}" && return 1
else
# make sure the fstype is one we can handle
local knownfs=0
diff --git a/src/profiles/profile-dieter b/src/profiles/profile-dieter
index a704876..2776ff5 100644
--- a/src/profiles/profile-dieter
+++ b/src/profiles/profile-dieter
@@ -18,8 +18,8 @@ phase_preparation ()
SVN_BASE=https://192.168.1.2/svn/repos
TARGET_HOST=mbp-santa-rosa #TODO: prompt user for this, or let him pass it as cmdline argument
- #TODO: find something against svn's interactive ssl cert checking. http://www.7php.net/svn-client-certificate-authentication-cache/ might help
-
+ #TODO: find something against svn's interactive ssl cert checking. http://www.7php.net/svn-client-certificate-authentication-cache/ might help. also the timeout on the 'accept cert' is frustrating
+ _accept_ssl_cert
notify "**** From now on. everything will be automatic. Enjoy the show!" # not true: svn will complain about ssl cert + you need pass for dm_crypt
execute worker runtime_packages
@@ -69,3 +69,25 @@ worker_install_bootloader ()
{
install-grub /dev/sda
}
+
+
+_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
+
+} \ No newline at end of file