summaryrefslogtreecommitdiffstats
path: root/etc/Makefile
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-10-27 16:13:28 +0000
committersam <sam@FreeBSD.org>2008-10-27 16:13:28 +0000
commit4c8cff48680c19f1f543455326a73783bee8a312 (patch)
tree9a0660b106ba4fc907f85896475adc8d19965262 /etc/Makefile
parent301c1469adf93477bd60e1d7aa6e846c039244b8 (diff)
downloadFreeBSD-src-4c8cff48680c19f1f543455326a73783bee8a312.zip
FreeBSD-src-4c8cff48680c19f1f543455326a73783bee8a312.tar.gz
o fix MK_TCSH == no: the default master.passwd sets up root to use /bin/csh
but there won't be one so root won't be able to login; edit the installed file to use /bin/sh in this case. o while here split csh-related files apart from sh and only install them when requested
Diffstat (limited to 'etc/Makefile')
-rw-r--r--etc/Makefile29
1 files changed, 20 insertions, 9 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 0c7a84c..a7a5914 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -8,7 +8,7 @@ SUBDIR= sendmail
.endif
BIN1= auth.conf \
- crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \
+ crontab devd.conf devfs.conf \
ddb.conf dhclient.conf disktab fbtab \
ftpusers gettytab group \
hosts hosts.allow hosts.equiv \
@@ -84,6 +84,10 @@ BIN1+= portsnap.conf
BIN1+= pf.os
.endif
+.if ${MK_TCSH} != "no"
+BIN1+= csh.cshrc csh.login csh.logout
+.endif
+
.if ${MK_WIRELESS} != "no"
BIN1+= regdomain.xml
.endif
@@ -148,9 +152,12 @@ distribution:
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
${BIN2} ${DESTDIR}/etc; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
- master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
- pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
- ${DESTDIR}/etc/master.passwd
+ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
+.if ${MK_TCSH} == "no"
+ sed -i "" -e 's;/bin/csh;;' ${DESTDIR}/etc/master.passwd
+.endif
+ pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
+ ${DESTDIR}/etc/master.passwd
.if ${MK_BLUETOOTH} != "no"
${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
.endif
@@ -195,14 +202,18 @@ distribution:
.endif
cd ${.CURDIR}/root; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
+ dot.profile ${DESTDIR}/root/.profile; \
+ rm -f ${DESTDIR}/.profile; \
+ ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
+.if ${MK_TCSH} != "no"
+ cd ${.CURDIR}/root; \
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
dot.cshrc ${DESTDIR}/root/.cshrc; \
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
dot.login ${DESTDIR}/root/.login; \
- ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
- dot.profile ${DESTDIR}/root/.profile; \
- rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
- ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
- ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
+ rm -f ${DESTDIR}/.cshrc; \
+ ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
+.endif
cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
${MTREE} ${DESTDIR}/etc/mtree
.if ${MK_PPP} != "no"
OpenPOWER on IntegriCloud