How our automounter replacement worksAs I've mentioned in passing, at one point we got so irritated with peculiar automounter issues that we wrote our own replacement that does what we want. It turned out to be fairly simple, because what we want is just to keep each system's mounted NFS filesystems in sync with a master list. Since this is basically (Also, at a certain point you are actually writing a program instead of just a shell script, and the Bourne shell is not a great programming language. Your successors will thank you for writing in something clearer.) The core Python program reads the master list and The core program is wrapped in a shell script that finds the right
configuration file and feeds the program's output to a shell, shows it
to the sysadmins, or both, depending on options. The shell script is
then run from (The shell script also checks local and global flag files that tell it to do nothing, so that we can manually manipulate NFS mounts without having our actions undone in the next ten minutes. You want this feature, trust me.) Error handling is simple. If an umount or a mount fails, there's no need to do anything special; the next time the script runs, it will notice that things are not in sync and try to fix them. |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |