Fix default runlevel symlink paths
runlevels/Makefile currently uses ${PREFIX} when creating the initial
runlevel symlinks, but the init files are installed to ${INITDIR},
which results in broken symlinks if ${SYSCONFDIR} is set to something
other than ${PREFIX}/etc
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
			
			
This commit is contained in:
		
				
					committed by
					
						 William Hubbs
						William Hubbs
					
				
			
			
				
	
			
			
			
						parent
						
							18bdbb6870
						
					
				
				
					commit
					da842085ce
				
			| @@ -14,7 +14,7 @@ ifeq (${MKNET},) | ||||
| BOOT+= network staticroute | ||||
| endif | ||||
|  | ||||
| INITDIR=	../init.d | ||||
| INITFILES=	../init.d | ||||
|  | ||||
| MK=		../mk | ||||
| include ${MK}/sys.mk | ||||
| @@ -54,34 +54,34 @@ install: | ||||
| 		${INSTALL} -d ${SYSINITDIR} || exit $$?; \ | ||||
| 		for x in ${SYSINIT}; do \ | ||||
| 			if test -n "${PREFIX}"; then \ | ||||
| 				grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \ | ||||
| 				grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \ | ||||
| 			fi; \ | ||||
| 			ln -snf ${PREFIX}/etc/init.d/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \ | ||||
| 			ln -snf ${INITDIR}/"$$x" ${SYSINITDIR}/"$$x" || exit $$?; done \ | ||||
| 	fi | ||||
| 	if ! test -d "${BOOTDIR}"; then \ | ||||
| 		${INSTALL} -d ${BOOTDIR} || exit $$?; \ | ||||
| 		for x in ${BOOT}; do \ | ||||
| 			if test -n "${PREFIX}"; then \ | ||||
| 				grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \ | ||||
| 				grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \ | ||||
| 			fi; \ | ||||
| 			ln -snf ${PREFIX}/etc/init.d/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \ | ||||
| 			ln -snf ${INITDIR}/"$$x" ${BOOTDIR}/"$$x" || exit $$?; \ | ||||
| 		done \ | ||||
| 	fi | ||||
| 	if ! test -d "${DEFAULTDIR}"; then \ | ||||
| 		${INSTALL} -d ${DEFAULTDIR} || exit $$?; \ | ||||
| 		for x in ${DEFAULT}; do \ | ||||
| 			if test -n "${PREFIX}"; then \ | ||||
| 				grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \ | ||||
| 				grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \ | ||||
| 			fi; \ | ||||
| 			ln -snf ${PREFIX}/etc/init.d/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \ | ||||
| 			ln -snf ${INITDIR}/"$$x" ${DEFAULTDIR}/"$$x" || exit $$?; done \ | ||||
| 	fi | ||||
| 	if ! test -d "${SHUTDOWNDIR}"; then \ | ||||
| 		${INSTALL} -d ${SHUTDOWNDIR} || exit $$?; \ | ||||
| 		for x in ${SHUTDOWN}; do \ | ||||
| 			if test -n "${PREFIX}"; then \ | ||||
| 				grep -q "keyword .*-prefix" ${INITDIR}/"$$x" && continue; \ | ||||
| 				grep -q "keyword .*-prefix" ${INITFILES}/"$$x" && continue; \ | ||||
| 			fi; \ | ||||
| 			ln -snf ${PREFIX}/etc/init.d/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \ | ||||
| 			ln -snf ${INITDIR}/"$$x" ${SHUTDOWNDIR}/"$$x" || exit $$?; done \ | ||||
| 	fi | ||||
|  | ||||
| check test:: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user