autofs5 variable substitution
I apologize if this is the wrong place for this, but my Googling has come up empty and I find myself at a loss.
In our enviroment we do automounts based on the OSNAME and OSREL variables. With autofs4 and the sun automounter we manually specify the values of OSNAME and OSREL in the init scripts. In the autofs4 init.d script there is a line for 'localoptions' where I can set '-DOSNAME=name -DOSREL=rel'. But I can't for the life of me figure out how to set this with an autofs5 init script. The init script specifies a confdir and the autofs file there. I tried adding 'OPTIONS="-DOSNAME=name -DOSREL=rel"' to that line, and the automountd process started with those correct flags, but then it wasn't able to mount anything from my automount maps. I also tried using LOCALOPTIONS instead of OPTIONS and that didn't do anything.
So I'm stuck. Is there documentation somewhere on the configuration options I can pass to the init script? Is what I'm trying to do possible anymore with autofs5
Thanks for the help,
Peter Bajurny
University of Minnesota Computer Science
Ian Kent
maintainerQuoted 14 lines · Peter Bajurny
I apologize if this is the wrong place for this, but my Googling has come up empty and I find myself at a loss.
In our enviroment we do automounts based on the OSNAME and OSREL variables. With autofs4 and the sun automounter we manually specify the values of OSNAME and OSREL in the init scripts. In the autofs4 init.d script there is a line for 'localoptions' where I can set '-DOSNAME=name -DOSREL=rel'. But I can't for the life of me figure out how to set this with an autofs5 init script. The init script specifies a confdir and the autofs file there. I tried adding 'OPTIONS="-DOSNAME=name -DOSREL=rel"' to that line, and the automountd process started with those correct flags, but then it wasn't able to mount anything from my automount maps. I also tried using LOCALOPTIONS instead of OPTIONS and that didn't do anything.
Yes, the OPTIONS configuration entry probably needs a bit of explanation in the comments.
See automount(8) or automount5(8), as the case may be, for the -O option.
Use OPTIONS="-O -DOSNAME=name -DOSREL=rel".
Not sure about if you will need separate quotes around the options themselves but give it a try.
Quoted 21 lines · Ian Kent
Quoted 15 lines · Peter Bajurny
I apologize if this is the wrong place for this, but my Googling has come up empty and I find myself at a loss.
In our enviroment we do automounts based on the OSNAME and OSREL variables. With autofs4 and the sun automounter we manually specify the values of OSNAME and OSREL in the init scripts. In the autofs4 init.d script there is a line for 'localoptions' where I can set '-DOSNAME=name -DOSREL=rel'. But I can't for the life of me figure out how to set this with an autofs5 init script. The init script specifies a confdir and the autofs file there. I tried adding 'OPTIONS="-DOSNAME=name -DOSREL=rel"' to that line, and the automountd process started with those correct flags, but then it wasn't able to mount anything from my automount maps. I also tried using LOCALOPTIONS instead of OPTIONS and that didn't do anything.
Yes, the OPTIONS configuration entry probably needs a bit of explanation in the comments.
Quoted 9 lines
See automount(8) or automount5(8), as the case may be, for the -O option.
Use OPTIONS="-O -DOSNAME=name -DOSREL=rel".
Not sure about if you will need separate quotes around the options themselves but give it a try.
Allright. I've tried that, both with and without quotes around the options. In both cases the automount process ran with those options according to ps, and 'normal' mounts worked, but I still couldn't access our $OSNAME$OSREL mounts. On my client, the default values of those variables would lead to a mount of Linux2.6.28-18-generic. I created that mountpoint and tried to mount that, and not even that works. I'm wondering if I'm being hit with this bug filed on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/autofs5/+bug/488229/
Although that but only affects user variables and not machine variables, so I could be wrong.
If setting enviroment variables doesn't work, I can get around that by using a combination of $OSNAME and $ARCH, but I'm worried that the client isn't even using the default values properly.
Thanks,
Peter Bajurny
Quoted 45 lines · Peter Bajurny
Quoted 22 lines · Ian Kent
Quoted 16 lines · Peter Bajurny
I apologize if this is the wrong place for this, but my Googling has come up empty and I find myself at a loss.
In our enviroment we do automounts based on the OSNAME and OSREL variables. With autofs4 and the sun automounter we manually specify the values of OSNAME and OSREL in the init scripts. In the autofs4 init.d script there is a line for 'localoptions' where I can set '-DOSNAME=name -DOSREL=rel'. But I can't for the life of me figure out how to set this with an autofs5 init script. The init script specifies a confdir and the autofs file there. I tried adding 'OPTIONS="-DOSNAME=name -DOSREL=rel"' to that line, and the automountd process started with those correct flags, but then it wasn't able to mount anything from my automount maps. I also tried using LOCALOPTIONS instead of OPTIONS and that didn't do anything.
Yes, the OPTIONS configuration entry probably needs a bit of explanation in the comments.
Quoted 10 lines
See automount(8) or automount5(8), as the case may be, for the -O option.
Use OPTIONS="-O -DOSNAME=name -DOSREL=rel".
Not sure about if you will need separate quotes around the options themselves but give it a try.
Allright. I've tried that, both with and without quotes around the options. In both cases the automount process ran with those options according to ps, and 'normal' mounts worked, but I still couldn't access our $OSNAME$OSREL mounts. On my client, the default values of those variables would lead to a mount of Linux2.6.28-18-generic. I created that mountpoint and tried to mount that, and not even that works. I'm wondering if I'm being hit with this bug filed on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/autofs5/+bug/488229/
Although that but only affects user variables and not machine variables, so I could be wrong.
Quoted 8 lines
If setting enviroment variables doesn't work, I can get around that by using a combination of $OSNAME and $ARCH, but I'm worried that the client isn't even using the default values properly.
Thanks,
Peter Bajurny
Well now this is embarrassing. It turns out all along that I had a stale process that meant everytime I thought I was restarting autofs and getting a new mount I was... not. This is how we did the OPTIONS:
OPTIONS="-DOSNAME=ubuntuamd -DOSREL=1"
Thanks for the help Ian.
Thanks,
Peter Bajurny
Ian Kent
maintainerQuoted 50 lines · Peter Bajurny
Quoted 49 lines · Peter Bajurny
Quoted 22 lines · Ian Kent
Quoted 16 lines · Peter Bajurny
I apologize if this is the wrong place for this, but my Googling has come up empty and I find myself at a loss.
In our enviroment we do automounts based on the OSNAME and OSREL variables. With autofs4 and the sun automounter we manually specify the values of OSNAME and OSREL in the init scripts. In the autofs4 init.d script there is a line for 'localoptions' where I can set '-DOSNAME=name -DOSREL=rel'. But I can't for the life of me figure out how to set this with an autofs5 init script. The init script specifies a confdir and the autofs file there. I tried adding 'OPTIONS="-DOSNAME=name -DOSREL=rel"' to that line, and the automountd process started with those correct flags, but then it wasn't able to mount anything from my automount maps. I also tried using LOCALOPTIONS instead of OPTIONS and that didn't do anything.
Yes, the OPTIONS configuration entry probably needs a bit of explanation in the comments.
Quoted 10 lines
See automount(8) or automount5(8), as the case may be, for the -O option.
Use OPTIONS="-O -DOSNAME=name -DOSREL=rel".
Not sure about if you will need separate quotes around the options themselves but give it a try.
Allright. I've tried that, both with and without quotes around the options. In both cases the automount process ran with those options according to ps, and 'normal' mounts worked, but I still couldn't access our $OSNAME$OSREL mounts. On my client, the default values of those variables would lead to a mount of Linux2.6.28-18-generic. I created that mountpoint and tried to mount that, and not even that works. I'm wondering if I'm being hit with this bug filed on Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/autofs5/+bug/488229/
Although that but only affects user variables and not machine variables, so I could be wrong.If setting enviroment variables doesn't work, I can get around that by using a combination of $OSNAME and $ARCH, but I'm worried that the client isn't even using the default values properly.
Quoted 8 lines
Quoted 4 lines
Thanks,
Peter BajurnyWell now this is embarrassing. It turns out all along that I had a stale process that meant everytime I thought I was restarting autofs and getting a new mount I was... not. This is how we did the OPTIONS:
OPTIONS="-DOSNAME=ubuntuamd -DOSREL=1"
Of course, oops, my mistake, -D is in fact an automount option so that is the way it should be done.
Ian