/etc/rc.local is truncated

Bug #1118581 reported by Jean-Baptiste Lallement
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UTAH
Fix Released
High
Javier Collado

Bug Description

UTAH updates the file rc.local and I noticed that the content of this file is incorrect on the autopilot boxes:

= = = = =
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

while (fuser /var/lib/dpkg/lock /var/cache/apt/archives/lock /var/lib/apt/lists/lock >/dev/null 2>&1); do echo Waiting
exit 0
= = = = =

Tags: ue-desktop

Related branches

Revision history for this message
Max Brustkern (nuclearbob) wrote :

Could you send the preseed you used when you got this, and tell me where it ran? There should be some package installation commands there normally, so I'd like to figure out why those are missing.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

The job ran on PS-Intel-HE-AP. Where is stored the preseed after installation?

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This line generated by UTAH is wrong

sed -i -e "/^exit 0$/iwhile (fuser /var/lib/dpkg/lock /var/cache/apt/archives/lock /var/lib/apt/lists/lock >/dev/null 2>&1); do echo "Waiting for dpkg lock to become available"; sleep 10; done; apt-get install -y --force-yes openssh-server >>/var/log/utah-install 2>&1; while (fuser /var/lib/dpkg/lock /var/cache/apt/archives/lock /var/lib/apt/lists/lock >/dev/null 2>&1); do echo "Waiting for dpkg lock to become available"; sleep 10; done; apt-get install -y --force-yes gdebi >>/var/log/utah-install 2>&1; " /etc/rc.local;

Revision history for this message
Javier Collado (javier.collado) wrote :

Looking at the command and the code it seems the problem is that there is a
nested double quoting that isn't working fine. A fix with either escaping the
quotation marks or replacing them with single quotation marks should fix the
problem.

Changed in utah:
assignee: nobody → Javier Collado (javier.collado)
status: New → Triaged
importance: Undecided → High
Changed in utah:
status: Triaged → In Progress
Changed in utah:
status: In Progress → Fix Committed
tags: added: ue-desktop
Changed in utah:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.