[SM-Commit] PERFORCE change 79715 by Pol Vinogradov for review
Perforce Review Daemon
p4review at smee.org
Tue May 23 13:45:01 EDT 2006
Change 79715 by pol_vinogradov at public on 2006/05/23 18:42:50
integrated to test
Affected files ...
... //sgl/grimoires/test/net/ppp/FINAL#6 integrate
... //sgl/grimoires/test/net/ppp/HISTORY#14 integrate
Differences ...
==== //sgl/grimoires/test/net/ppp/FINAL#6 (xtext) ====
@@ -1,19 +1,17 @@
-# Does /etc/resolv.conf already exist?
-if [ -s ${INSTALL_ROOT}/etc/resolv.conf ]
+# resolv.conv handling
+if [ "$USE_PEER_DNS" == "y" ]
then
- FILE_EXISTS=1
-else
- FILE_EXISTS=0
-fi
-
-if [ "$USE_PEER_DNS" == "y" ]; then
- if [ $FILE_EXISTS ]
+ if [[ -s ${INSTALL_ROOT}/etc/resolv.conf && ! -h ${INSTALL_ROOT}/etc/resolv.conf ]]
then
- cat ${INSTALL_ROOT}/etc/resolv.conf >> /etc/ppp/resolv.conf &&
- mv ${INSTALL_ROOT}/etc/resolv.conf \
- ${INSTALL_ROOT}/etc/resolv.conf.`date +%Y%m%d%k%M%S | sed 's: ::g'`
+ cat ${INSTALL_ROOT}/etc/resolv.conf >> ${INSTALL_ROOT}/etc/ppp/resolv.conf &&
+ mv ${INSTALL_ROOT}/etc/resolv.conf \
+ ${INSTALL_ROOT}/etc/resolv.conf.`date +%Y%m%d%k%M%S | sed 's: ::g'`
fi &&
- ln -s /etc/ppp/resolv.conf /etc/resolv.conf
+ rm -f ${INSTALL_ROOT}/etc/resolv.conf &&
+ ln -s ${INSTALL_ROOT}/etc/ppp/resolv.conf ${INSTALL_ROOT}/etc/resolv.conf &&
+ message "${MESSAGE_COLOR}NOTICE: Your current ${INSTALL_ROOT}/etc/resolv.conf has been\n" \
+ "backed up, it's contents have been copied to /etc/ppp/resolv.conf,\n" \
+ "and has been replaced by a symbolic link.\n\n"
fi &&
message "${MESSAGE_COLOR}Please edit /etc/ppp/chat/isp and insert your\n" \
@@ -29,11 +27,4 @@
"Read the man pages on ppp and chat for more information.\n" \
"In some cases, perhaps an internal modem on a non-standard port,\n" \
"ln -s ttyS04 /dev/modem might work.\n" \
- "\n" &&
-
-if [ $FILE_EXISTS ]
-then
-message "NOTICE: Your current ${INSTALL_ROOT}/etc/resolv.conf has been\n" \
- "backed up, it's contents have been copied to /etc/ppp/resolv.conf,\n"\
- "and has been replaced by a symbolic link.\n"
-fi
+ "\n"
==== //sgl/grimoires/test/net/ppp/HISTORY#14 (text) ====
@@ -1,3 +1,6 @@
+2006-05-23 Pol Vinogradov <vin.public at gmail.com>
+ * FINAL: fixed resolv.conf handling completely
+
2006-05-13 Matthew Clark <matthewclark at inlesserterms.net>
* FINAL: Trying to enhance message, bug 10409
More information about the SM-Commit
mailing list