On Thu, 2011-01-27 at 09:42 +0100, Martin Gerdes wrote:
> Sorry for not following up sooner, it kind of slipped away since I had 
> my workaround...
> 
> ~#df /tmp
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/mapper/buildServer--1-tmp
>                         4805760    142028   4419612   4% /tmp
> 
> So its obvious why your code snippet does not trigger: "df /tmp" does 
> not output the information that /tmp is mounted noexec.

df is just used to get the device name for the mount point, the
subsequent "mount | grep" actually checks for noexec.

However because your device name is quite long df has split the entry
over two lines which causes the awk expresion to print the wrong thing
(nothing in fact).

Maks, perhaps "df -P" helps?

It's always annoyed me that there is no (to my knowledge) simple "get
the device name / mount point for this path" tool in Unix. Alternatively
if mount took an option which caused it to just print the information
pertaining to a given path (inferring the relevant mount point from it)
then that would be very useful. (the purpose of this paragraph is to
provoke someone into saying "oh, you can just use $FOO", ;-))

Ian.

> Even though it definitely is mounted noexec:
> ~#mount | grep 'on /tmp'
> /dev/mapper/buildServer--1-tmp on /tmp type ext3 (rw,noexec,nosuid,nodev)
> 
> -- 
> 
> Mit freundlichen Grüßen
> 
> Martin Gerdes
> Fachinformatiker (Systemintegration)
> 
> *********************************************************
> * Deutsche Software Engineering&  Research GmbH
> *
> * Postanschrift:
> * Melanchthonstraße 19 - 02826 Görlitz - Germany
> *
> * Phone: +49 (0) 35 81 / 309 250
> * Fax: +49 (0) 35 81 / 309 259
> *
> * E-Mail: martin.ger...@dser.de
> * Web: http://www.dser.de
> *
> * Sitz der Gesellschaft:
> * Melanchthonstraße 19 - 02826 Görlitz - Germany
> * Registergericht: Amtsgericht Dresden - HRB 24819
> *
> * Vertretungsberechtigte Geschäftsführer:
> * Johann Horch (CEO) - Marek Wester (CTO)
> *********************************************************
> 
> This e-mail may contain confidential and/or privileged
> information. If you are not the intended recipient (or have received
> this e-mail in error) please notify the sender immediately and
> destroy this e-mail. Any unauthorized copying, disclosure or
> distribution of the material in this e-mail is strictly forbidden.
> 
> 
> 
> 

-- 
Ian Campbell
Current Noise: Motörhead - Metropolis

All I want is a warm bed and a kind word and unlimited power.
                -- Ashleigh Brilliant




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to