Results 1 to 3 of 3

Thread: Cleaning up options.conf on older installations

  1. #1
    Join Date
    Mar 2013
    Posts
    76

    Cleaning up options.conf on older installations

    Is there a better way to clean up options.conf besides removing the existing one and running ./build update_script? Doing so will recreate options.conf with everything properly categorized but then it has all of the default values in place. It's not too hard to fix when you've made a backup of the old one but that's not something you would want to have to do on a regular basis either.

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,068
    Hello,

    I believe as nobody replied yet, there is no other solution. So you will need to backup your options.conf and build a new one with your preferences manually.
    Regards, Alex G.

    - You can hire me on www.poralix.com to work on your server
    - Follow and like @Poralix on Facebook

  3. #3
    Join Date
    Mar 2013
    Posts
    76
    Turns out it wasn't too difficult to do through the power of awk.

    Code:
    awk 'BEGIN { FS="="; } { if (NR==FNR) { pkeynline[$1]=$0; } else if (pkeynline[$1]) { print pkeynline[$1]; } else { print; } }' options.conf.bak options.conf > beautified.conf
    followed by

    Code:
    diff options.conf beautified.conf
    to help highlight differences in the current default settings, in case I want to make those changes anyway.

    The fact that there are some values that changed from no to yes when I grabbed the default makes me hesitant to turn it into a shell script. I might miss some meaningful changes/improvements to some options as a result.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •