[PATCH] eject -T support
Tito
farmatito at tiscali.it
Sat Oct 7 16:44:49 UTC 2006
On Saturday 7 October 2006 18:19, Denis Vlasenko wrote:
> On Saturday 07 October 2006 17:47, Tito wrote:
> > > I have an idea: remove that code entirely, then:
> > >
> > > #!/bin/sh
> > > umount /dev/cdrom
> > > eject
> > >
> > > Would this work?
> >
> > I don't think so. One test I did was to use
> >
> > umount_main()
> >
> > instead of the actual code but this gave me some errors on one
> > of the two cases depending if I fed the device or the mount dir
> > as args.
>
> I tested it and it worked for me as shell script.
With busybox umount!?
>
> If "umount /dev/cdrom" errors out where it should work, we need
> to fix *that*.
>
> > Also something as
> >
> > system("umount bla")
>
> shell scripts are easier to debug/change than hardcoded stuff.
> Clever admin/disctro builder might do, for example:
>
> ....
> # Unmount dev from ALL mountpoints if needed
> # (not just the first!)
> i=10
> while ! eject "$dev" && test "$i" != 0; do
> umount "$dev"
> let i-- # bash'ism?
> done
>
> Imagine how you would do this in C...
Just trying....give me one day, if I'm not able to find
a working and non bloated solution we can do it the way
you like best.
Ciao,
Tito
> --
> vda
>
More information about the busybox
mailing list