[laptop-mode] [PATCH] laptop-mode script confused by mount points with spaces

Louis Simard louis.simard at gmail.com
Sun Sep 20 09:10:52 CEST 2009


--0016e6d77e71d0349b0473fd1000
Content-Type: text/plain; charset=ISO-8859-1

Hi,

The script 'laptop-mode', which is in charge of remounting partitions
without the atime mount flag, gets confused by mount points containing
spaces (actually, any octal escape). For reference, the script is
installed in Ubuntu as
/usr/share/laptop-mode-tools/modules/laptop-mode . Attached is a patch
to fix this problem.

-- Prior to patch --

/etc/mtab says:
/dev/sdf1 /media/External\040HDD ext3 rw,nosuid,nodev,uhelper=devkit 0 0
mount point name: /media/External HDD

/usr/sbin/laptop_mode says:
Laptop mode enabled, active
mount: mount point /media/External040HDD does not exist

-- Output with this patch --

Laptop mode enabled, active

I'm using Ubuntu Karmic alpha 6 AMD64 with their version 1.47-ubuntu1
of Laptop Mode Tools; this patch should be against your version 1.47
as well.

Regards,
- Louis Simard

--0016e6d77e71d0349b0473fd1000
Content-Disposition: attachment; filename="laptop-mode.patch"
X-Attachment-Id: f_fztg7bvi0
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

A non-text attachment was scrubbed...
Name: laptop-mode.patch
Type: text/x-patch
Size: 3042 bytes
Desc: not available
URL: <http://mailman.samwel.tk/pipermail/laptop-mode/attachments/20090920/e0f1b927/attachment.bin>

--0016e6d77e71d0349b0473fd1000--


More information about the laptop-mode mailing list