summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-01 23:06:25 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-01 23:06:25 +0100
commitb22c101c94622577fba858cb4e1baae6a3b6fdd6 (patch)
tree6054591292f0b9814c7364cad222fd3d5ccce67a /src
parent43689224c1db3a4a23440d364fb4be557590b75e (diff)
refactoring in interactive profile, some stuff related to phases/workers, and some todo updates
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fifa.sh2
-rw-r--r--src/profiles/profile-base63
-rw-r--r--src/profiles/profile-dieter6
-rw-r--r--src/profiles/profile-interactive-DRAFT.sh69
4 files changed, 101 insertions, 39 deletions
diff --git a/src/fifa.sh b/src/fifa.sh
index 09d6d1e..53ad10b 100755
--- a/src/fifa.sh
+++ b/src/fifa.sh
@@ -147,3 +147,5 @@ PACMAN=pacman
PACMAN_TARGET="pacman --root $var_TARGET_DIR --config /tmp/pacman.conf"
start_process
+
+exit 0 \ No newline at end of file
diff --git a/src/profiles/profile-base b/src/profiles/profile-base
index ab41540..dd9a7b2 100644
--- a/src/profiles/profile-base
+++ b/src/profiles/profile-base
@@ -3,22 +3,21 @@
var_DEFAULTFS="/boot:32:ext2:+ swap:256:swap /:7500:ext3 /home:*:ext3"
var_TARGET_DIR="/mnt"
var_RUNTIME_PACKAGES=
-var_PKG_SOURCE_TYPE='cd'
var_PKG_FILE=/home/arch/fifa/package-list
-var_FILE_URL="file:///src/core/pkg"
-var_MIRRORLIST="/etc/pacman.d/mirrorlist"
var_UI_TYPE="cli" # set to cli or dia for dialog
###### Phases ( can be overridden by more specific profiles) ######
phase_preparation ()
{
+ execute worker select_source
execute worker runtime_packages
}
phase_basics ()
{
+ execute worker set_clock
execute worker prepare_disks
}
@@ -27,18 +26,33 @@ phase_system ()
{
execute worker package_list
execute worker install_packages
+ execute worker auto_fstab #TODO: exact names of these 3
+ execute worker auto_network
+ execute worker auto_locale
+ execute worker configure_system
+ execute worker mkinitcpio
+ execute worker locales
execute worker install_bootloader
}
phase_finish ()
{
- execute worker configure_home
+ true
}
###### Workers ( can be overridden by more specific profiles) ######
+worker_select_source ()
+{
+ var_PKG_SOURCE_TYPE='cd'
+ var_FILE_URL="file:///src/core/pkg"
+ var_MIRRORLIST="/etc/pacman.d/mirrorlist"
+ # if you override to use ftp (or ask user and he chooses ftp) don't forget to configure the network and to select_mirrors
+}
+
+
worker_runtime_packages ()
{
for pkg in $var_RUNTIME_PACKAGES
@@ -48,9 +62,16 @@ worker_runtime_packages ()
}
+worker_set_clock ()
+{
+ true
+}
+
+
worker_prepare_disks ()
{
partition # use lib-archboot function by default
+ # in official installer: autoprepare or diy first partitions, then mountpoints
}
@@ -74,15 +95,41 @@ worker_install_packages ()
}
-worker_install_bootlader ()
+worker_auto_fstab ()
{
- #TODO: ask which disk, install grub on it
+}
+
+
+worker_auto_network ()
+{
+}
+
+
+worker_auto_locale ()
+{
+
+}
+
+
+worker_configure_system ()
+{
+ #TODO: what to do here?
true
}
-worker_configure_home ()
+worker_mkinitcpio ()
{
- notify "No actions specified"
}
+
+worker_locales ()
+{
+}
+
+
+worker_install_bootlader ()
+{
+ #TODO: ask which disk, install grub on it
+ true
+}
diff --git a/src/profiles/profile-dieter b/src/profiles/profile-dieter
index 9fe2730..66d7c41 100644
--- a/src/profiles/profile-dieter
+++ b/src/profiles/profile-dieter
@@ -25,6 +25,12 @@ phase_preparation ()
execute worker runtime_packages
}
+phase_finish ()
+{
+ execute worker configure_home
+}
+
+
worker_prepare_disks ()
{
#TODO: integrate this stuff into the functions in the libs + do error checking and handling
diff --git a/src/profiles/profile-interactive-DRAFT.sh b/src/profiles/profile-interactive-DRAFT.sh
index b7f5a68..145b32d 100644
--- a/src/profiles/profile-interactive-DRAFT.sh
+++ b/src/profiles/profile-interactive-DRAFT.sh
@@ -15,21 +15,46 @@ PART_ROOT=
# <mountpoint>:<partsize>:<fstype>[:+]
DEFAULTFS="/boot:32:ext2:+ swap:256:swap /:7500:ext3 /home:*:ext3"
-# install stages
-S_SRC=0 # choose install medium
-S_NET=0 # network configuration
-S_CLOCK=0 # clock and timezone
-S_PART=0 # partitioning
-S_MKFS=0 # formatting
-S_MKFSAUTO=0 # auto fs part/formatting TODO: kill this
-S_SELECT=0 # package selection
-S_INSTALL=0 # package installation
-S_CONFIG=0 # configuration editing
-S_GRUB=0 # TODO: kill this - if using grub
-S_BOOT="" # bootloader installed (set to loader name instead of 1)
+
+
+start_process ()
+{
+ #####################
+ ## begin execution ##
+
+ # install stages
+ S_SRC=0 # choose install medium
+ S_NET=0 # network configuration
+ S_CLOCK=0 # clock and timezone
+ S_PART=0 # partitioning
+ S_MKFS=0 # formatting
+ S_MKFSAUTO=0 # auto fs part/formatting TODO: kill this
+ S_SELECT=0 # package selection
+ S_INSTALL=0 # package installation
+ S_CONFIG=0 # configuration editing
+ S_GRUB=0 # TODO: kill this - if using grub
+ S_BOOT="" # bootloader installed (set to loader name instead of 1)
+
+ var_UI_TYPE=dia
+
+ notify "Welcome to the Arch Linux Installation program. The install \
+ process is fairly straightforward, and you should run through the options in \
+ the order they are presented. If you are unfamiliar with partitioning/making \
+ filesystems, you may want to consult some documentation before continuing. \
+ You can view all output from commands by viewing your VC7 console (ALT-F7). \
+ ALT-F1 will bring you back here."
+
+ while true
+ do
+ mainmenu
+ done
+
+}
+
phase_preparation ()
{
+ #TODO: when does grub device map happen in official installer?
execute worker runtime_packages
notify "Generating GRUB device map...\nThis could take a while.\n\n Please be patient."
get_grub_map
@@ -82,7 +107,7 @@ mainmenu()
partition() {
if [ "$S_MKFSAUTO" = "1" ]; then
- DIALOG --msgbox "You have already prepared your filesystems with Auto-prepare" 0 0
+ notify "You have already prepared your filesystems with Auto-prepare" 0 0
return 0
fi
@@ -814,22 +839,4 @@ EOF
if [ $S_DHCP -ne 1 ]; then
auto_network
fi
-
-
-#####################
-## begin execution ##
-
-DIALOG --msgbox "Welcome to the Arch Linux Installation program. The install \
-process is fairly straightforward, and you should run through the options in \
-the order they are presented. If you are unfamiliar with partitioning/making \
-filesystems, you may want to consult some documentation before continuing. \
-You can view all output from commands by viewing your VC7 console (ALT-F7). \
-ALT-F1 will bring you back here." 14 65
-
-while true; do
- mainmenu
- done
-
- exit 0
-
\ No newline at end of file