[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#653673: the live-config init.d script should depend on mountkernfs



Package: live-config
Version: 3.0~a31-1

There is a race condition between mountkernfs and user-setup

When RAMTMP=yes in /etc/default/rcS, then the
mountkernfs init.d script mounts /tmp as a tmpfs.

The 002-user-setup script first writes some data into a temporary file,
and then reads it back, and deletes it.

The race condition happens when the new /tmp partition is mounted
before the temporary data is read back. This doesn't happen always,
but the problem can be reproduced by adding sleep statements
artificially to the two scripts (add a small sleep statement to the start
of mountkernfs, and a bigger sleep statement on line 71 of user-setup
(between write and read).

Temporary quick fix:
make a hook in config/hooks , called fix_live_config_boot.sh.chroot, containing:
#!/bin/sh
sed -i -e 's|^# Required-Start:\(.*\)$|# Required-Start: mountkernfs
\1|' /etc/init.d/live-config
insserv


-- 
Purdea Andrei
http://purdea.ro
student at the “Politehnica” University of Timisoara
Faculty of Automation and Computers (AC)
Master's Degree Program - Computer Engineering (MCE)
2nd year



Reply to: