Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 50611 | Differences between
and this patch

Collapse All | Expand All

(-)apache-module.eclass.orig (+36 lines)
Lines 217-222 Link Here
217
		einfo "You may want to edit it before turning the module on in /etc/conf.d/apache"
217
		einfo "You may want to edit it before turning the module on in /etc/conf.d/apache"
218
		einfo
218
		einfo
219
	fi
219
	fi
220
221
	if [ -n "${APACHE1_MOD_DIRINDEX}" ] ; then
222
		apache-module_add_directoryindex ${APACHE1_MOD_DIRINDEX}
223
	fi
220
}
224
}
221
225
222
######
226
######
Lines 328-333 Link Here
328
		einfo "You may want to edit it before turning the module on in /etc/conf.d/apache2"
332
		einfo "You may want to edit it before turning the module on in /etc/conf.d/apache2"
329
		einfo
333
		einfo
330
	fi
334
	fi
335
336
	if [ -n "${APACHE2_MOD_DIRINDEX}" ] ; then
337
		apache-module_add_directoryindex ${APACHE2_MOD_DIRINDEX}
338
	fi
331
}
339
}
332
340
333
######
341
######
Lines 377-382 Link Here
377
	fi
385
	fi
378
}
386
}
379
387
388
389
apache-module_add_directoryindex() {
390
	debug-print-function apache-module_add_directoryindex
391
392
	if [ ${APACHE_VERISON} -eq '1' ]; then
393
		HTTPD_CONF=${APACHE1_CONFDIR}/httpd.conf
394
	else
395
		HTTPD_CONF=${APACHE2_CONFDIR}/httpd.conf
396
	fi
397
398
	until [ -z "$1" ]
399
	do
400
		DIRIDX=$(grep -m 1 '^DirectoryIndex' ${HTTPD_CONF})
401
		if ! hasq $1 ${DIRIDX}; then
402
			NEW_DIRIDX="${NEW_DIRIDX} $1"
403
		fi
404
		shift
405
	done
406
407
	if [ -n "${NEW_DIRIDX}" ] ; then
408
		einfo "Adding${NEW_DIRIDX} to DirectoryIndex of ${HTTPD_CONF}"
409
		NEW_DIRIDX="# ${DIRIDX}\n#${NEW_DIRIDX} automaticly added by ${PF}\n${DIRIDX}${NEW_DIRIDX}"
410
		cp ${HTTPD_CONF} ${T}/httpd.conf.bak
411
		sed "s/^DirectoryIndex .*$/${NEW_DIRIDX}/" < ${T}/httpd.conf.bak > ${HTTPD_CONF}
412
	fi
413
414
}
415
380
EXPORT_FUNCTIONS pkg_setup src_compile src_install pkg_postinst
416
EXPORT_FUNCTIONS pkg_setup src_compile src_install pkg_postinst
381
417
382
# vim:ts=4
418
# vim:ts=4

Return to bug 50611