On Tuesday 07 August 2007 05:22, Joshua Hoblitt wrote:
> Hi Folks,
>
> I have the (perhaps crazy) desire to, from a script, remount a
> filesystem and read only and fsck it.  The irritating thing is that
> e2fsck requires an interactive authorization (even under -f) unless your
> attempting this on the root filesystem.  I would just script around this
> but e2fsck calls isatty() just to thwart such attempts.  Does anyone
> know of a means around this with out modifying the sources?
>
> Thanks,
>
> -J
>
> --

Have you tried the program 'expect' to do your script?
It should be able to deal with that confirmation prompt.
(Not that I am recommending doing so, but if you know
what you're doing with those fscks, expect should do the trick).

Thanks,
Mathieu
-- 
[EMAIL PROTECTED] mailing list

Reply via email to