Don't re-write the .fogsettings file
Wayne Workman last edited by Wayne Workman
I am working on a little add-on thing for FOG, I originally was putting extra settings into the .fogsettings file.
I just found out that the latest FOG Trunk installer throws out my custom settings in the .fogsettings file.
Is there any way to leave unknown settings in there alone?
There’s a script here, that’s what I’m working on:
dodnsmasqto the .fogsettings file.
It might be a better idea to just add the settings to the DB instead… thoughts?
right now my scripts just stick the new settings at the very end of the
.fogsettingsfile, and the installer will repeat the passwords settings. I’ve also just manually placed the additional settings within the defined start/finish area of the file with the same results.
@Wayne-Workman What’s your scripts looking like?
The .fogsettings file is no longer being totally re-written, but something is funky when I add my own parameters to it.
dodnsmasq, but when I do this, the password and ftp password get re-written over and over at the bottom of the file. See below.
## Start of FOG Settings ## Created by the FOG Installer ## Version: 6269 ## Install time: Sat 13 Feb 2016 08:25:58 AM CST ipaddress='10.0.0.4' interface='ens3' submask='255.255.0.0' routeraddress='10.0.0.1' plainrouter='10.0.0.1' dnsaddress='22.214.171.124' dnsbootimage='126.96.36.199' password='x4Nd8pKtliYg+pTAHL/jYNeVEPA21JiR/NRWrgRdoCs=' osid='1' osname='Redhat' dodhcp='n' bldhcp='0' blexports='1' installtype='N' snmysqluser='' snmysqlpass='' snmysqlhost='' installlang='0' donate='0' storageLocation='/images' fogupdateloaded=1 storageftpuser='fog' storageftppass='m4g9HHtgfIgTdr8dvhNjy/9NLaKXvLO83Un1+620qCE=' docroot='/var/www/html/' webroot='fog/' caCreated='yes' startrange='10.0.0.10' endrange='10.0.255.254' bootfilename='undionly.kpxe' packages='httpd php php-cli php-common php-gd mariadb mariadb-server dhcp-server tftp-server nfs-utils vsftpd net-tools wget xinetd tar gzip make m4 gcc gcc-c++ lftp php-mysqlnd curl php-mcrypt php-mbstring mod_ssl php-fpm php-process' noTftpBuild='' notpxedefaultfile='' dodnsmasq='0' bldnsmasq='1' ## End of FOG Settings ## Version: 6269 password='x4Nd8pKtliYg+pTAHL/jYNeVEPA21JiR/NRWrgRdoCs=' storageftppass='m4g9HHtgfIgTdr8dvhNjy/9NLaKXvLO83Un1+620qCE='
It works - the settings that my script puts in there are not being thrown out now. :-)
I have made some strides towards getting this as it does make sense. New installs will now have a start and end line indicator as well.
I worked around the issue by creating a secondary settings file - so don’t worry about this.