#netapp (7-mode 8.2.5) as a dhcp client?
1 messages · Page 1 of 1 (latest)
not possible AFAIR
thanks
although isn't /etc/rc like a script anyway? couldn't /etc/rc invoke a binary or other shell script on the filesystem to ifconfig the interfaces to whatever values another shell script might provide? maybe this other shell script can run a dhcp query (maybe I'll have to compile a freebsd 8.1 binary for that); just thinking.
is /etc/rc just a shell script, can it invoke other binaries or scripts? @pearl star
hmm, no, in fact /etc/rc is just whatever commands are allowed by ontap; it can't run arbitrary scripts or binaries.
unless you know of a way to run binaries stored on the OS filesystem from ontap (other than systemshell which wouldn't work here because it needs an interactive session)
maybe sh -c? but that's sandboxed to only a few binaries, haven't looked into adding some into this chroot.
That’s not true. /etc/rc is a script on 7 mode. I know there was a way to “re-run” after setup from the cli. I used to put sleep commands in there to.
You can only add commands to/etc/rc that you can use in the shell. Sleep is a normal ONTAP command, so it works. I don't think you can add arbitrary scripts, and you definitely can't call any binaries
I forgot how I would re-run the/etc/rc (I know…probably simple but haven’t done it in 15 years) but the same way if I recall worked on a file of commands (scripts) and agree that it only works with ONTAP binaries
thanks!
yeah, maybe you can actually call scripts (does source or . exist in the 7-mode shell? I don't have a system handy that I could power up and try)
source does exist
toaster*> source /etc/a.sh
wget not found. Type '?' for a list of commands
/usr/bin/wget not found. Type '?' for a list of commands
/mroot/usr/bin/wget not found. Type '?' for a list of commands
nope
Right. Wget is not an ONTAP binary. Only ONTAP binaries/commands may be used or scripts of ONTAP binaries
basically you can use all commands that help shows you, and nothing more
Including “priv set dig”
I remember having to actually do that in /etc/rc to bypass some silly issue
yeah, but I think help also shows priv, doesn't it?
you need priv set diag in /etc/rc if you want to do a setflag on every boot, for example
there is no sh. I mean, there is (in BSD) but the 7-mode shell cannot run BSD commands. It can only run its internal commands (those that you see via help)...
there is also no xinetd. ONTAP is not UNIX 😉
that being said, I don't know if you have the systemshell in newer 7-mode versions (I only have a 7.3.7 system with the monolithic kernel for testing), you might be able to cobble something together with that. But it's unsupported and you can completely destroy your system with that, so I wouldn't suggest it
What are you trying to achieve @hushed solar ?
@solemn plover get a dhcp lease on e0a and e0M
@pearl star yes I've been using systemshell, where xinetd is.
Sure, I see that, why DHCP instead of static though?
because it's more convenient for me
I will see if I can do it somewhere in init scripts from systemshell
Fair enough, thanks for sharing
no prob
I don't think xinetd is enabled/running by default. You need to make sure to run it in the correct vserver context too, otherwise it will have the wrong network interfaces
also, any changes you make to the init scripts will probably be overwritten by the next ONTAP update so you might need to redo them periodically
That is assuming vFilers are being used
I don't have vFilers
Which is why I never/ever used the “gui”/filerview to update the system! So many issues having an unusable system after modifications. Sheesh
not vfiler, vserver. I'm not sure how the 7-mode personality of the newer ONTAPs works, but I'm pretty sure you still have multiple "vserver contexts" in the BSD shell, for example to separate out the ACP, OS2SP and MCC (if used) networks so that they don't interfere with the user-visible network configurations
these are quite similar to BSD jails and make sure you can use IP addresses that are also used "internally" in ONTAP (like the 10.x.x.x that is used for OS2SP, or the 192.168.x.x that is used for ACP)
the command is vcontext run IIRC
vcontext not found. Type '?' for a list of commands
it's a BSD command
ah thanks
so, systemshell
yup
I don't think it is documented very well but you can infer a lot of its parameters and usage from the various scripts lying around in /mroot etc.
poking around in systemshell is fun. I still want to write up some documentation of that when I ever get around to doing it 🙂
but it's also quite easy to beak things, so use a simulator or nonproduction system for testing
not too worried about that, it's a lab setup
Are "vservers" a BSD thing outside of vFilers from 7mode?
I thought everything sat in the vFiler0 context when you weren't using multistore
that's only what you see from within the ONTAP 7-mode shell. under the hood, these vfiler contexts need to be represented somehow in the BSD kernel, and ONTAP does that by using something similar to BSD jails that is (confusingly) named "vcontext" for "vserver context". I guess it is a relic of the Spinnaker stack back in the GX days. It's not exactly BSD jails but it works very similar. Note that there was also an (unrelated?) "Linux-vserver" project in the 90s that did something similar on Linux, long before containers came back into fashion in the late 2000's.
Thanks!
@pearl star was Ontap always on FBSD, even 5.x and all?