summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO10
-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
5 files changed, 109 insertions, 41 deletions
diff --git a/TODO b/TODO
index af5ce25..4d74580 100644
--- a/TODO
+++ b/TODO
@@ -1,12 +1,18 @@
* process and fix libraries
* fix to use $var_UI_TYPE where needed
-* write the ui functions for asking questions etc for both cli and dialog,
-and port all code to use it.
+* write the ui functions for asking questions etc for both cli and dialog and port all code to use it.
* instead of using the 'base' profile and letting other profiles override,
we should have even more flexibilty to take parts from different profiles.
+ eg dieter profile maybe wants to use something interactive. or base
+ profile wants to do something interactive. interactive functions maybe
+ dont belong in a profile?
+
+* base profile idea: it should just tell you what to do? -> less
+ implementation work in base profile, more in other profiles...
* fix crossconcerns: some procedures could be about _what_ (desktop,server),
others are about _how_ (autodetection, asking user,...) (profile vs...
'mode' ?)
+* port classic installer so it works with fifa
* make some sensible default profiles (eg desktop, server, ...)
* make it work
* someday.. make a script '/arch/setup' that calls '/arch/fifa.sh interactive'
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