WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Race condition in tc-config (2.1)  (Read 2215 times)

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Race condition in tc-config (2.1)
« on: July 20, 2009, 04:11:29 PM »
The parts of the script which handle the tce= and restore= boot parameters do not "wait $fstab_pid" so if the user specifies noswap nolocal and does not specify any other boot option which will wait, then it is possible that tce= and restore= will fail.

This is present in 2.1; I did not check 2.2.

The patch below fixes the problem:

@@ -475,6 +482,7 @@
    echo "${GREEN}Skipping TCE Application Extensions as requested on the command line.${NORMAL}"
    MOUNTPOINT="/tmp"; TCE_DIR="tce"
 else
+   wait $fstab_pid
    # First check cdrom for extra apps
    if [ -d /cdrom/tce ]; then
       MOUNTPOINT="/cdrom"
@@ -545,6 +553,7 @@
 if [ -n "$NORESTORE" ]; then
   echo "${GREEN}Skipping restore as requested from the command line.${NORMAL}"
 else
+   wait $fstab_pid
   /etc/init.d/tc-restore.sh "$TCEDIR"
 fi

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Race condition in tc-config (2.1)
« Reply #1 on: July 20, 2009, 06:44:35 PM »
Many thanks! Applied.
10+ Years Contributing to Linux Open Source Projects.