Bug#670585: "ok hat location is writable"
Tito
farmatito at tiscali.it
Wed May 8 13:57:02 BST 2019
On 5/8/19 6:38 AM, Dmitry Bogatov wrote:
>
> [2019-05-06 07:33] Tito <farmatito at tiscali.it>
>> [ Dmitry Bogatov ]
>>> - log_success_msg "Done checking file systems.
>>> -A log is being saved in ${FSCK_LOGFILE} if that location is writable."
>>> + log_success_msg 'Done checking file systems'
>>> + log_success_msg "Log is being saved in ${FSCK_LOGFILE} if that location is writable"
>>> fi
>>> fi
>
>> Hi,
>> maybe something like:
>>
>> if test -w ${FSCK_LOGFILE} ; then
>> log_success_msg "Log is saved in ${FSCK_LOGFILE}
>> else
>> log_success_msg "Cannot save log in ${FSCK_LOGFILE}
>> fi
>
> Thank you, Tito. But I am not sure this is correct:
>
> As I understand the whole point of "logsave" is that if directory of
> logfile (/var/log/fsck) does not exist, "logsave" will wait till it
> appears.
>
> So, by the time we are logging this message, ${FSCK_LOGFILE} may not
> exists yet, but its future content is hanging somewhere in memory of
> "logsave" process.
>
> Problem is that I do not understand, when /var/log/fsck exist for sure.
>
> Collegues, I need help with evaluating proposed change.
>
Hi,
I guess if it is a one partition only setup /var/log will
exist as soon as as root is switched from initrd and/or
remounted read-write, if it is a multi-partition setup
with separated partitions for /tmp, /home and /var,
/var will exist as soon as root is switched from
initrd but /var/log will exist only after /var is mounted.
If there is something in the outbuf buffer
logsave loops forever !? until it gets a file descriptor:
setsid(); /* To avoid getting killed by init */
while (outfd < 0) {
outfd = open(outfn, openflags, 0644);
sleep(1);
}
write_all(outfd, outbuf, outbufsize);
free(outbuf);
}
open(), openat(), and creat() return the new file descriptor, or -1 if an error occurred
Hope this helps.
Ciao,
Tito
More information about the Debian-init-diversity
mailing list