summaryrefslogtreecommitdiff
path: root/src/lib/lib-software.sh
blob: 8ec802a91b8454fff4683c1a9bad6a8298f5f475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh


# run_mkinitcpio() taken from setup. adapted a bit.
# runs mkinitcpio on the target system, displays output
run_mkinitcpio()  
{
	target_special_fs on

	run_background mkinitcpio "chroot $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
	[ $(cat /tmp/.mkinitcpio-retcode) -ne 0 ] && show_warning "MKINITCPIO FAILED - SYSTEM MAY NOT BOOT" "/tmp/mkinitcpio.log" text
}