sysklogd: Check for hanging link file also when installing the conf file.
PATCH 1/1 sysklogd: Check for hanging link file also when installing the conf file.
When the configuration files point to a rw area (such as tmp), the build time link is dangling and the current check of the syslog.conf is not complete. The configuration file therefore can point to some runtime config file or the default in the ro fs.
--- package/sysklogd/sysklogd.mk | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
package/sysklogd/sysklogd.mk +1 -1
@@ -32,7 +32,7 @@ define SYSKLOGD_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0644 $(@D)/syslogd.8 $(TARGET_DIR)/usr/share/man/man8/syslogd.8 $(INSTALL) -D -m 0644 $(@D)/syslog.conf.5 $(TARGET_DIR)/usr/share/man/man5/syslog.conf.5 $(INSTALL) -D -m 0644 $(@D)/klogd.8 $(TARGET_DIR)/usr/share/man/man8/klogd.8 - if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \ + if [ ! -f $(TARGET_DIR)/etc/syslog.conf ] && [ ! -h $(TARGET_DIR)/etc/syslog.conf ] ; then \ $(INSTALL) -D -m 0644 package/sysklogd/syslog.conf \ $(TARGET_DIR)/etc/syslog.conf; \ fi
Signature · 1 line
1.7.7.1
PATCH 1/1 sysklogd: Check for hanging link file also when installing the conf file.
Le Mon, 7 Nov 2011 15:40:50 +0100,
Ryan Raasch <[email protected]> a ?crit :
package/sysklogd/sysklogd.mk define SYSKLOGD_INSTALL_TARGET_CMDS · line 35
Quoted 2 lines
package/sysklogd/sysklogd.mk +1
-1- if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \ + if [ ! -f $(TARGET_DIR)/etc/syslog.conf ] && [ ! -h $(TARGET_DIR)/etc/syslog.conf ] ; then \
Wouldn't
Review
Quoted 1 line
(quoted diff) +0
-1- if [ ! -e $(TARGET_DIR)/etc/syslog.conf ]; then \
Be better ?
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 sysklogd: Check for hanging link file also when installing the conf file.
I tried that also. It returns false also on a dangling link.
/Ryan
Quoted 22 lines · Thomas Petazzoni
Le Mon, 7 Nov 2011 15:40:50 +0100,
Ryan Raasch <[email protected]> a ?crit :Quoted 2 lines
- ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \
+ ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ] && [ ! -h $(TARGET_DIR)/etc/syslog.conf ] ; then \Wouldn't
Quoted 1 line
- ? ? if [ ! -e $(TARGET_DIR)/etc/syslog.conf ]; then \
Be better ?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/1 sysklogd: Check for hanging link file also when installing the conf file.
# ln hello # if [ ! -e hello ] ; then echo "I don't exist"; fi I don't exist
I thought -e worked also.
/Ryan
Quoted 29 lines · Ryan Raasch
I tried that also. It returns false also on a dangling link.
/Ryan
Quoted 22 lines · Thomas Petazzoni
Le Mon, 7 Nov 2011 15:40:50 +0100,
Ryan Raasch <[email protected]> a ?crit :Quoted 2 lines
- ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \
+ ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ] && [ ! -h $(TARGET_DIR)/etc/syslog.conf ] ; then \Wouldn't
Quoted 1 line
- ? ? if [ ! -e $(TARGET_DIR)/etc/syslog.conf ]; then \
Be better ?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot