* [Buildroot] [PATCH] sysklogd: Check for hanging link file also when installing the conf file.
@ 2011-11-07 14:40 Ryan Raasch
2011-11-07 15:21 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Raasch @ 2011-11-07 14:40 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Ryan Raasch <ryan.raasch@gmail.com>
---
package/sysklogd/sysklogd.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk
index 11aee2a..283fe18 100644
--- a/package/sysklogd/sysklogd.mk
+++ b/package/sysklogd/sysklogd.mk
@@ -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
--
1.7.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] sysklogd: Check for hanging link file also when installing the conf file.
2011-11-07 14:40 [Buildroot] [PATCH] sysklogd: Check for hanging link file also when installing the conf file Ryan Raasch
@ 2011-11-07 15:21 ` Thomas Petazzoni
2011-11-07 15:24 ` Ryan Raasch
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2011-11-07 15:21 UTC (permalink / raw)
To: buildroot
Le Mon, 7 Nov 2011 15:40:50 +0100,
Ryan Raasch <ryan.raasch@gmail.com> a ?crit :
> - if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \
> + if [ ! -f $(TARGET_DIR)/etc/syslog.conf ] && [ ! -h $(TARGET_DIR)/etc/syslog.conf ] ; then \
Wouldn't
> - 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] sysklogd: Check for hanging link file also when installing the conf file.
2011-11-07 15:21 ` Thomas Petazzoni
@ 2011-11-07 15:24 ` Ryan Raasch
2011-11-07 15:26 ` Ryan Raasch
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Raasch @ 2011-11-07 15:24 UTC (permalink / raw)
To: buildroot
I tried that also. It returns false also on a dangling link.
/Ryan
On 7 November 2011 16:21, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Le Mon, 7 Nov 2011 15:40:50 +0100,
> Ryan Raasch <ryan.raasch@gmail.com> a ?crit :
>
>> - ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \
>> + ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ] && [ ! -h $(TARGET_DIR)/etc/syslog.conf ] ; then \
>
> Wouldn't
>
>> - ? ? 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] sysklogd: Check for hanging link file also when installing the conf file.
2011-11-07 15:24 ` Ryan Raasch
@ 2011-11-07 15:26 ` Ryan Raasch
0 siblings, 0 replies; 4+ messages in thread
From: Ryan Raasch @ 2011-11-07 15:26 UTC (permalink / raw)
To: buildroot
# ln hello
# if [ ! -e hello ] ; then echo "I don't exist"; fi
I don't exist
I thought -e worked also.
/Ryan
On 7 November 2011 16:24, Ryan Raasch <ryan.raasch@gmail.com> wrote:
> I tried that also. It returns false also on a dangling link.
>
> /Ryan
>
> On 7 November 2011 16:21, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Le Mon, 7 Nov 2011 15:40:50 +0100,
>> Ryan Raasch <ryan.raasch@gmail.com> a ?crit :
>>
>>> - ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \
>>> + ? ? if [ ! -f $(TARGET_DIR)/etc/syslog.conf ] && [ ! -h $(TARGET_DIR)/etc/syslog.conf ] ; then \
>>
>> Wouldn't
>>
>>> - ? ? 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-07 15:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-07 14:40 [Buildroot] [PATCH] sysklogd: Check for hanging link file also when installing the conf file Ryan Raasch
2011-11-07 15:21 ` Thomas Petazzoni
2011-11-07 15:24 ` Ryan Raasch
2011-11-07 15:26 ` Ryan Raasch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox