blob: f93f1a590cd7f37e234723943e30121266adb0c0 (
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
|
#!/bin/sh
# run_mkinitcpio() taken from setup. adapted a lot
# runs mkinitcpio on the target system, displays output
run_mkinitcpio()
{
target_special_fs on
run_background mkinitcpio "chroot $var_TARGET_DIR /sbin/mkinitcpio -p kernel26" /tmp/mkinitcpio.log
follow_progress "Rebuilding initcpio images ..." /tmp/mkinitcpio.log
wait_for mkinitcpio
target_special_fs off
# alert the user to fatal errors
[ $mkinitcpio_exitcode -ne 0 ] && show_warning "MKINITCPIO FAILED - SYSTEM MAY NOT BOOT" "/tmp/mkinitcpio.log" text
return $mkinitcpio_exitcode
}
# installpkg(). taken from setup. modified bigtime
# performs package installation to the target system
installpkg() {
notify "Package installation will begin now. You can watch the output in the progress window. Please be patient."
target_special_fs on
run_background pacman-installpkg "$PACMAN_TARGET -S $TARGET_PACKAGES" /home/arch/fifa/runtime/pacman.log
follow_progress " Installing... Please Wait " /home/arch/fifa/runtime/pacman.log
wait_for pacman-installpkg
local _result=''
if [ ${pacman-installpkg_exitcode} -ne 0 ]; then
_result="Installation Failed (see errors below)"
echo -e "\nPackage Installation FAILED." >>/home/arch/fifa/runtime/pacman.log
else
_result="Installation Complete"
echo -e "\nPackage Installation Complete." >>/home/arch/fifa/runtime/pacman.log
fi
show_warning "$_result" "/home/arch/fifa/runtime/pacman.log" text || return 1
target_special_fs off
sync
return ${pacman-installpkg_exitcode}
}
# auto_locale(). taken from setup
# enable glibc locales from rc.conf and build initial locale DB
target_configure_inital_locale()
{
for i in $(grep "^LOCALE" ${var_TARGET_DIR}/etc/rc.conf | sed -e 's/.*="//g' -e's/\..*//g'); do
sed -i -e "s/^#$i/$i/g" ${var_TARGET_DIR}/etc/locale.gen
done
target_locale-gen
}
target_locale-gen ()
{
infofy "Generating glibc base locales..."
chroot ${var_TARGET_DIR} locale-gen >/dev/null
}
|