blob: aa71d3533f0d68d5befe55682e6d02721428d80b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#!/bin/bash
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 runtime_packages
}
phase_basics ()
{
execute worker prepare_disks
}
phase_system ()
{
execute worker package_list
execute worker install_packages
execute worker install_bootloader
}
phase_finish ()
{
execute worker configure_home
}
###### Workers ( can be overridden by more specific profiles) ######
worker_runtime_packages ()
{
for pkg in $var_RUNTIME_PACKAGES
do
$PACMAN -Sy --noconfirm --needed $pkg
done
}
worker_prepare_disks ()
{
partition # use lib-archboot function by default
}
# Put the list of packages to be installed in $var_PKG_FILE
worker_package_list ()
{
#TODO: sensible list of packages
true
}
worker_install_packages ()
{
target_special_fs on
[ ! -f $var_PKG_FILE ] && die_error "No package file available!"
PKGLIST=`cat $var_PKG_FILE`
#TODO: what if $var_PKG_FILE is empty? we should die_error because that's probably not what the user wants.. or can it? will pacman complain?
$PACMAN_TARGET -Sy $PKGLIST || die_error "Package installation FAILED."
target_special_fs off
}
worker_install_bootlader ()
{
#TODO: ask which disk, install grub on it
true
}
worker_configure_home ()
{
notify "No actions specified"
}
|