View | Details | Raw Unified | Return to bug 10866
Collapse All | Expand All

(-)a/alterator-install2.spec (-1 / +1 lines)
Lines 35-41 Conflicts: alterator-install2 Link Here
35
Requires: alterator-install-common
35
Requires: alterator-install-common
36
36
37
#install3 modules
37
#install3 modules
38
Requires: evms fdisk mdadm
38
Requires: evms mdadm
39
Requires: alterator-users
39
Requires: alterator-users
40
Requires: alterator-apt
40
Requires: alterator-apt
41
Requires: alterator-net-tcp dhcpcd
41
Requires: alterator-net-tcp dhcpcd
(-)a/backend3/lilo.in (-7 / +55 lines)
Lines 6-11 PROG="alterator-lilo" Link Here
6
destdir="@DESTROOTDIR@"
6
destdir="@DESTROOTDIR@"
7
lilo_template="@INSTALL3_DATA@/lilo.conf.template"
7
lilo_template="@INSTALL3_DATA@/lilo.conf.template"
8
lilo_conf_new="/tmp/lilo.conf"
8
lilo_conf_new="/tmp/lilo.conf"
9
blkid_args="-c /dev/null -w /dev/null"
9
10
10
workdir=
11
workdir=
11
sections=
12
sections=
Lines 77-83 convert_bootdev() { Link Here
77
			device_exists "$bootdev" || return 1
78
			device_exists "$bootdev" || return 1
78
		fi
79
		fi
79
80
80
		if ! boot_uuid="UUID=$(/sbin/blkid -o value -s UUID "$bootdev" 2>/dev/null)"; then
81
		if ! boot_uuid="UUID=$(/sbin/blkid $blkid_args -o value -s UUID "$bootdev" 2>/dev/null)"; then
81
			error "$bootdev: Unable to get UUID"
82
			error "$bootdev: Unable to get UUID"
82
			return 1
83
			return 1
83
		fi
84
		fi
Lines 89-95 convert_bootdev() { Link Here
89
		sed -i -e "s#^boot=.*#boot=\"$bootdev\"#" "$lilo_conf"
90
		sed -i -e "s#^boot=.*#boot=\"$bootdev\"#" "$lilo_conf"
90
}
91
}
91
92
93
partitions_list() {
94
	sfdisk -l 2>/dev/null |
95
		sed -r	-e '\#^/dev/#!d' \
96
			-e 's#[[:space:]]+# #g' \
97
			-e 's#^(/dev/[^[:space:]]+) ([[:digit:]])#\1 x \2#'
98
}
99
100
set_bootable() {
101
	local boot="$1"
102
103
	if [ -z "$boot" ]; then
104
		debug "$fn: Something wrong! first argument is emply"
105
		return 0
106
	fi
107
	device_exists "$boot" || return 0
108
109
	local dev= num=
110
111
	dev="$(printf %s "$boot" |sed -r -e 's,^(/dev/.*[^0-9])[0-9]+$,\1,')"
112
	device_exists "$dev" || return 0
113
114
	num="$(printf %s "$boot" |sed -r -e 's,^/dev/.*[^0-9]([0-9]+)$,\1,')"
115
	[ -n "$num" ] || return 0
116
117
	debug "set_bootable(): set bootable flag on '$boot' partittion (dev='$dev', num='$num')"
118
	sfdisk "$dev" -A "$num"
119
}
120
121
bootable_flag() {
122
	local bootdev="/dev/${1#/dev/}"
123
124
	if sfdisk -s |cut -d: -f1 |grep -xqs "$bootdev"; then
125
		local firstdev=  plist=
126
127
		plist="`partitions_list |grep "^$bootdev" |cut -d\  -f1,2`"
128
		printf %s "$plist" |grep -qs '[[:space:]]\*$' &&
129
			return 0
130
131
		firstdev="`printf %s "$plist" cut -d\  -f1 |head -1`"
132
133
		set_bootable "$firstdev"
134
	fi
135
136
	sfdisk -l 2>/dev/null |grep -qs "^$bootdev[[:space:]]" ||
137
		return 0
138
139
	set_bootable "$bootdev"
140
}
141
92
write_liloconf() {
142
write_liloconf() {
143
	local bootdev="$(sed -r -n -e 's,^boot=\"([^\"]+)\",\1,p' "$lilo_conf_new")"
144
93
	convert_bootdev "$lilo_conf_new" || return 1
145
	convert_bootdev "$lilo_conf_new" || return 1
94
146
95
	if ! out="$(lilo -t -C "$lilo_conf_new" 2>&1 >/dev/null)"; then
147
	if ! out="$(lilo -t -C "$lilo_conf_new" 2>&1 >/dev/null)"; then
Lines 99-105 write_liloconf() { Link Here
99
	debug "write_liloconf(): lilo test passed"
151
	debug "write_liloconf(): lilo test passed"
100
	[ ! -f /etc/lilo.conf ] || mv -f -- /etc/lilo.conf /etc/lilo.conf.save
152
	[ ! -f /etc/lilo.conf ] || mv -f -- /etc/lilo.conf /etc/lilo.conf.save
101
	mv -f -- "$lilo_conf_new" /etc/lilo.conf
153
	mv -f -- "$lilo_conf_new" /etc/lilo.conf
102
	lilo >/dev/null 2>&1
154
	lilo >/dev/null 2>&1 && bootable_flag "$bootdev"
103
}
155
}
104
156
105
write_section() {
157
write_section() {
Lines 291-301 find_others() { Link Here
291
	done < /proc/mounts
343
	done < /proc/mounts
292
	debug "exclude='$exclude'"
344
	debug "exclude='$exclude'"
293
345
294
	fdisk -l 2>/dev/null |
346
	partitions_list |
295
		sed -r \
296
			-e '\#^/dev/#!d' \
297
			-e 's#[[:space:]]+# #g' \
298
			-e 's#^(/dev/[^[:space:]]+) ([[:digit:]])#\1 x \2#' |
299
	while read dev boot start end blocks id system; do
347
	while read dev boot start end blocks id system; do
300
		# We need only bootable partitions
348
		# We need only bootable partitions
301
		[ "$boot" = "*" ] || continue
349
		[ "$boot" = "*" ] || continue
(-)a/bin/install2.in (-1 / +1 lines)
Lines 148-154 rc=0 Link Here
148
printf "Starting Xorg server...\n"
148
printf "Starting Xorg server...\n"
149
cmd="xinit /usr/sbin/alterator-install2 -- vt7 -dpms -ac -dpi 80 -logfile /tmp/x11.log"
149
cmd="xinit /usr/sbin/alterator-install2 -- vt7 -dpms -ac -dpi 80 -logfile /tmp/x11.log"
150
if ! $cmd >/tmp/install2.log 2>&1; then
150
if ! $cmd >/tmp/install2.log 2>&1; then
151
	for drv in vesa vga; do
151
	for drv in fbdev vesa vga; do
152
		video_setup "$drv" /etc/X11/xorg.conf
152
		video_setup "$drv" /etc/X11/xorg.conf
153
		$cmd >/tmp/install2.log 2>&1 && break || rc=$?
153
		$cmd >/tmp/install2.log 2>&1 && break || rc=$?
154
	done
154
	done
(-)a/data/lilo.conf.template (-1 / +1 lines)
Lines 6-12 prompt Link Here
6
timeout="100"
6
timeout="100"
7
install="menu"
7
install="menu"
8
default="ALTLinux"
8
default="ALTLinux"
9
append=""
9
append="panic=30"
10
10
11
image="/boot/vmlinuz"
11
image="/boot/vmlinuz"
12
	label="ALTLinux"
12
	label="ALTLinux"
(-)a/ui/install2/basesystem.scm (-4 / +2 lines)
Lines 22-30 Link Here
22
22
23
		((stage)
23
		((stage)
24
			(case (cond-plistq 'stage msg "")
24
			(case (cond-plistq 'stage msg "")
25
				((download-pkgs) (progress text (_ "Downloading packages ...")))
25
				((download-pkgs) (progress text (_ "Getting packages ...")))
26
				((install-pkgs)  (progress text (_ "Installing packages ...")))
26
				((install-pkgs)  (progress text (_ "Installing packages ..."))))
27
				((install-kern)  (progress text (_ "Installing kernel ..."))))
28
			(progress maximum (cond-plistq 'max msg 0)))
27
			(progress maximum (cond-plistq 'max msg 0)))
29
	)
28
	)
30
)
29
)
31
- 

Return to bug 10866