How do I force an upgrade to overwrite my prior changes?

  • A while ago I modified the openmediavault-update-smart-drivedb file so it would redirect to /dev/null messages that were showing up in notification e-mails. When I did the latest update to 2.2 I got the following:


    Code
    Configuration file `/etc/cron.weekly/openmediavault-update-smart-drivedb'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
     ==> Using current old file as you requested.


    Is there a way I can force it to use the updated file instead of my modified file?

  • Deleting the file and running apt-get --reinstall install openmediavault should regenerate the original file.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • Thanks davidh2k. Since 2.2.1 is now released I have another problem. I believe I need to use the 2.2.0 update to redo the file, but we are now at 2.2.1.


    The command you gave re-installs 2.2.1, but that doesn't replace the file. Trying to use "apt-get --reinstall install openmediavault package=2.2.0" gives an error "E: Unable to locate package package".

  • Whats the output of apt-get update?


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • apt-get update runs fine.


    Also, apt-get --reinstall install openmediavault also runs fine, it just reinstalls 2.2.1 which doesn't solve the original problem which occurred with 2.2.0.


  • which doesn't solve the original problem which occurred with 2.2.0.


    Which would that be? Asking if the file should be replaced or not? Even when reinstalling 2.2.1 and the file missing due to a manual removal it should regenerate it.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • I did try removing it (or rather I moved it to a different name <file>_bak) and then I ran the reinstall command. Unfortunately, it did not regenerate the file.


    Was this file superceeded by another file? I have two smart files in the cron.weekly directory:


    openmediavault-update-smart-drivedb
    openmediavault-update-smart-drivedb.dpkg-dist


    The first generates an error when run:
    root@openmediavault:/etc/cron.weekly# ./openmediavault-update-smart-drivedb
    /usr/share/smartmontools/drivedb.h.error: rejected by /usr/sbin/smartctl, probably no longer compatible


    The second works fine:
    root@openmediavault:/etc/cron.weekly# ./openmediavault-update-smart-drivedb.dpkg-dist
    Updating smartmontools 5.41 drive database ...
    /usr/share/smartmontools/drivedb.h updated from branches/RELEASE_5_41_DRIVEDB


    If the first was removed and replaced by the second, then that would explain why it isn't being replaced.

  • You can download the original file via wget https://sourceforge.net/p/openmediavault/code/HEAD/tree/branches/2.x/deb/openmediavault/etc/cron.weekly/openmediavault-update-smart-drivedb?format=raw and move it to the desired location, make sure to check that permissions are set correctly.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • I'm getting an error, and I feel like I should have been able to figure out the cause, but after poking around for 5-10 minutes I'm still not sure why I'm getting the error:


    Code
    root@openmediavault:/etc/cron.weekly# wget https://sourceforge.net/p/openmediavault/code/HEAD/tree/branches/2.x/deb/openmediavault/etc/cron.weekly/openmediavault-update-smart-drivedb?format=raw
    -bash: $'\342\200\213wget': command not found
  • Perfect, I have it updated now.


    The OMV GUI install options were setup to preserve user changes to system files, but for me this is problematic because I'd rather have the new files. For the future, what apt-get options control whether it overwrites/doesn't overwrite user changed files?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!