Solved Cannot eject

FreeBSD 11.1 running under Parallels for Mac 13

Hello. I'm trying to use the command eject /dev/cdrom but I am getting the error eject: Command not found. I'm logged on as root. I'm also confused because eject appears to be a standard command within FreeBSD - eject(1)
 
Please post the output of whereis eject and echo $PATH.
 
Screen Shot 2018-03-19 at 16.28.05.png


I think I can see the problem! But isn't eject supposed to be a standard part of FreeBSD?

And should I move eject so that it is in the existing path or should I extend the scope of the path?
 
Strangely, it is also absent on my stock 11.1 installation. It seems to be an optional package or port. Why did I say "strangely"? Because I would have guessed that eject would be a part of the core installation.

If you are using packages, then "pkg install eject" should work. If you are using ports, then cd to /usr/ports/sysutils/eject, then do a "make install".

Question for people who know more about the development process: How can one find out whether the omission from the core installation was a deliberate choice, or whether it is a clerical error?
 
Because I would have guessed that eject would be a part of the core installation.
As far as I know it never was. At least I can't find it on 6.x, 7.x, 8.x, 9.x, 10.x and 11.x, so it's safe to assume it was always installed as a port/package. Perhaps as a dependency of cdrecord for example.
 
Strangely, it is also absent on my stock 11.1 installation. It seems to be an optional package or port. Why did I say "strangely"? Because I would have guessed that eject would be a part of the core installation.

If you are using packages, then "pkg install eject" should work. If you are using ports, then cd to /usr/ports/sysutils/eject, then do a "make install".

Question for people who know more about the development process: How can one find out whether the omission from the core installation was a deliberate choice, or whether it is a clerical error?

I've just looked more closely at /usr/ports/sysutils/eject and as you suggest ralphbsz it is a source folder. I can certainly do a make install there, but is there a way to install all of the tools in usr/ports, assuming that that's a good idea of course! I'm still getting to grips with what is and what is not a good idea!

Or I could do a pkg install eject. Does this result in the compiled executable being placed in the same location as doing it with make install?
 
but is there a way to install all of the tools in usr/ports, assuming that that's a good idea of course!
Probably not a good idea, there are currently about 33000+ ports and you really don't want to install everything.
 
Good point, well made! I tend to get a bit greedy where new tech toys are concerned but that's a bit excessive, even for me!
 
Probably not a good idea, there are currently about 33000+ ports and you really don't want to install everything.

I have to second SirDice's statement here. Some ports conflict with other ports, so that can be a major issue depending on what you are trying to do. As for the posted topic, I've been using FreeBSD since 3.4 and I have never, ever seen an eject command in the base system. I've always had to install it from the ports.

You know, if you really want to eject that badly, make sure that you are wearing the proper safety gear and that the chair that you are riding in has a parachute before you punch out. :p:p:p:p
 
As far as I know it never was. At least I can't find it on 6.x, 7.x, 8.x, 9.x, 10.x and 11.x, so it's safe to assume it was always installed as a port/package. Perhaps as a dependency of cdrecord for example.
OK, so it must have been a deliberate choice to not include it. A strange choice, but who am I to judge.

As to the question above whether "make install" in a port will have the same end result as "pkg install" for a package: Yes, it should. But common wisdom (*) is that you should either use ports or packages on your system, and not mix them. So use the same installation technique that you have used previously for other things.

(* Footnote: There are some voices who disagree and say mixing packages and ports is OK if one is careful. And I've yet to find a simple argument for using one or the other; the situation is complex. So this seems to just be "common wisdom", not an absolutely strict rule.)
 
cdcontrol eject ejects a disc as well....

Though I'm also pretty sure that ejectwas part of the base system earlier.
Looking at my (rather old) tcsh-aliases, I have there some for play,stop, next and prev... using cdcontrol,but no alias for eject.

As far as I can remeber I have never ever used cdcontrol eject, but only eject alone.
So it must have been removed at some point.

It's not on my FreeBSD 11.1-RELEASE either, no manpage, nothing, only the port ralphbsz mentioned.
 
Back
Top