Screwed up fog.man.reg in init.xz
-
also, if you just need the original to compare against, to find your mistake, you can find it here:
https://github.com/FOGProject/fogproject/tree/master/src/buildroot/package/fog/scripts/bin -
Thanks, you guys rule. I’ll try again later, but for now, it is back to the default
-
Sorry for the double post, but I got the registration items I wanted to remove removed. My next task (if possible) is to change something so the “Would you like this host to join AD” and the “Would you like to deploy an image now” would be hidden as well but they should always be set to “yes”. If that makes any sense.
-
@fry_p While I haven’t look at the script in a while, I assume the questions just set a variable with y or n. So hide the question and then set the default for the variable. That sounds doable.
Great job so far!
-
@george1421 I changed my mind on automatically saying yes to deploying an image. However, I still want an auto-yes for joining AD. I can’t seem to find where I would set the variable to force a yes. Would you guys take a peek at https://github.com/FOGProject/fogproject/blob/master/src/buildroot/package/fog/scripts/bin/fog.man.reg
and tell me where I can force this? Thanks, I’m lousy at coding. -
This is the section in question starting at line 245
while [[ -z $askme ]]; do echo -n " Would you like this host to join a domain, (using default settings)? (y/N) " read askme case $askme in [Nn]|[Nn][Oo]|"") askme="N" ;; [Yy]|[Yy][Ee][Ss]) blDoAD=$(echo -n 1 | base64) askme="Y" ;; *) askme="" echo " * Invalid input, please try again" ;; esac done
I might tweak it this way (to cause as little damage as possible)
while [[ -z $askme ]]; do # echo -n " Would you like this host to join a domain, (using default settings)? (y/N) " # read askme # force the answer to be Yes, always askme="Y" case $askme in [Nn]|[Nn][Oo]|"") askme="N" ;; [Yy]|[Yy][Ee][Ss]) blDoAD=$(echo -n 1 | base64) askme="Y" ;; *) askme="" echo " * Invalid input, please try again" ;; esac done
-
@george1421 That worked perfectly, thank you! So it is the way I want it. I don’t do RC’s for the time being because I need it to be stable, but when a new stable version comes out, I go for it. My question is will an upgrade replace my custom init?
-
@fry_p said in Screwed up fog.man.reg in init.xz:
My question is will an upgrade replace my custom init?
The short answer is yes. You can either take a diff (linux application) of the changes between original and your fixed version and then apply that to the new version or just manually edit the new version.
-
@george1421 I use a script for auto updating to stable versions once a week. I added an
rsync -c
command to copy my init.xz to the /var/www/html/fog/service/ipxe folder based on checksum. It appears to work. I’ll let you guys know if I run into any trouble. -
@fry_p Ok that will work.
We are also (in the other thread) working out a way to dynamic replace the init’s fog.reg.man file with a patched one so you don’t need to keep messing with the inits. The down side is if the original one gets changed as new features are added then your off-line one will be out of sync with production.
-
@george1421 I will most likely try post init scripts eventually for that reason. I saw your post on the other thread and it honestly looks easier than what I did lol. I’m burned out today, plus I just got the thing working
-
@fry_p Your current efforts has not gone to waste. When the other method is proven, you will just move your patched fog.mag.reg to the fog server postinits directory and add in the postinit scripts to copy it over each time. What you have created to day will work just fine moving forward, you just won’t have to unpack and repack the inits after each change.