/usr/local/sbin/pfSense-upgrade deletions

  • Was on 2.4.5.r.20200225.2100 and going to 2.4.5.r.20200229.0000

    Web config updates failing
    console updates failing; from console at least got an error message:

    /bin/sh: cannot open /usr/local/sbin/pfSense-upgrade: No such file or directory

    Just sort of stabbing in the dark:

    touch pfSense-upgrade
    chmod +x pfSense-upgrade

    Obviously the above didn't work, console upgrade still did nothing; but no error message this time.

    /cf/conf/upgrade_log.latest.txt has nothing new since several days ago bumping up to 225.2100
    No errors or mentions of deleting the update file

    System ceased finding new updates after 0000 timeframe.
    Did a fresh install, and bumping 2.4.4p3 to 2.4.5.r.20200229.0900 also wound up deleting the file.
    So I've got two instances of update attempts in a row that deleted the update file. Kind of a bummer.

    For the record the original contents of the file in 2.4.4p3 are below, but I'm guessing it got deleted during an attempted update so ymmv:

    # pfSense-upgrade.wrapper
    # part of pfSense (https://www.pfsense.org)
    # Copyright (c) 2015-2016 Rubicon Communications, LLC (Netgate)
    # All rights reserved.
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    # http://www.apache.org/licenses/LICENSE-2.0
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    pfsense_upgrade=$(realpath -q $(dirname $0)/../libexec/$(basename $0))
    lockfile="/tmp/$(basename $0).lock"
    if [ ! -f ${pfsense_upgrade} ]; then
    	echo "ERROR: Unable to find ${pfsense_upgrade}"
    	exit 1
    if [ "$(id -u)" -ne "0" ]; then
    	echo "ERROR: It must run as root"
    	exit 1
    # lockf return codes, from sysexits(3)
    EX_TEMPFAIL=75	# The specified lock file was already locked by another process.
    EX_CANTCREAT=73	# The lockf utility was unable to create the lock file, e.g.,
    		# because of insufficient access privileges.
    EX_OSERR=71	# A system call (e.g., fork(2)) failed unexpectedly.
    EX_SOFTWARE=70	# The command did not exit normally, but may have been signaled
    		# or stopped.
    # Special return code to detect when pfSense-upgrade was upgraded and must
    # be called again to make sure latest version is running
    while true; do
    	unset run_again
    	/usr/bin/lockf -s -t 5 ${lockfile} ${pfsense_upgrade} "$@"
    	unset error
    	case "$rc" in
    			echo "Another instance is already running... Aborting!"
    			exit $EX_TEMPFAIL
    			echo "ERROR: Unable to create lockfile ${lockfile}"
    			exit $EX_CANTCREAT
    			echo "ERROR: An unexpected OS error happened"
    			echo "ERROR: An unexpected error happened"
    	[ -f "${lockfile}" ] \
    		&& rm -f ${lockfile}
    	[ -n "${error}" ] \
    		&& exit $error
    	[ -n "${run_again}" ] \
    		&& continue
    	exit $rc

  • Same issue I'm seeing.
    trying to go from 2.4.5.r.20200226.1800 to 2.4.5.r.20200228.1800

    /bin/sh: cannot open /usr/local/sbin/pfSense-upgrade: No such file or directory

    Any idea how to get fix?

  • Looks like it's known about - https://redmine.pfsense.org/issues/10303

  • Thanks for pointing me there. The suggested workaround steps worked for me.

    pkg update && pkg upgrade -y

  • Confirm seems to have completed a valid update cycle this time.
    I didn't test the webconfig.

    went from 2.4.4p3 to 0229.1500 successfully with the pkg update && pkg upgrade -y and a manual reboot.

  • @skogs Solved my issue Thank you

  • Netgate Administrator

    Also seeing this in current 2.4.5 and 2.5 snapshots. I was also able to recover by running pkg upgrade manually.

    We are looking into this.


  • Hit this as well. Recourse was to manually install again and recover from xml backup. (Did that before seeing this)

  • Rebel Alliance Developer Netgate

    See https://redmine.pfsense.org/issues/10303

    The better fix, for those who hit it already, is to run pkg install pfSense-upgrade

    It's been addressed in the repo, so if you didn't hit it yet, you shouldn't hit it now when upgrading.

  • @skogs said in /usr/local/sbin/pfSense-upgrade deletions:

    pkg update && pkg upgrade -y

    pkg install pfSense-upgrade
    Updating pfSense-core repository catalogue...
    Fetching meta.txz: 100% 944 B 0.9kB/s 00:01
    Fetching packagesite.txz: 100% 2 KiB 1.8kB/s 00:01
    Processing entries: 100%
    pfSense-core repository update completed. 7 packages processed.
    Updating pfSense repository catalogue...
    Fetching meta.txz: 100% 940 B 0.9kB/s 00:01
    Fetching packagesite.txz: 100% 141 KiB 10.3kB/s 00:14
    Processing entries: 100%
    pfSense repository update completed. 522 packages processed.
    All repositories are up to date.
    Updating database digests format: 100%
    The following 1 package(s) will be affected (of 0 checked):

    New packages to be INSTALLED:
    pfSense-upgrade: 0.79 [pfSense]

    Number of packages to be installed: 1

    13 KiB to be downloaded.

    Proceed with this action? [y/N]: y
    [1/1] Fetching pfSense-upgrade-0.79.txz: 100% 13 KiB 13.7kB/s 00:01
    Checking integrity... done (0 conflicting)
    [1/1] Installing pfSense-upgrade-0.79...
    [1/1] Extracting pfSense-upgrade-0.79: 100%
    [2.4.5-RC][admin@face]/root: pfSense-upgrade -6
    pfSense-upgrade: Command not found.

  • Rebel Alliance Developer Netgate

    When you install a new program like that, you have to type rehash or exit and re-enter the shell.

  • pfSense-upgrade -6

    Updating repositories metadata...
    Updating pfSense-core repository catalogue...
    pfSense-core repository is up to date.
    Updating pfSense repository catalogue...
    Fetching meta.txz: . done
    Fetching packagesite.txz: .... done
    pkg-static: https://pkg.pfsense.org/pfSense_v2_4_5_amd64-pfSense_v2_4_5/packagesite.txz: Operation timed out
    Unable to update repository pfSense
    Error updating repositories!

  • Rebel Alliance Developer Netgate

    This thread is not for problems like that. It's for the specific issue of pfSense-upgrade getting removed.

    Start a new thread.

  • use this command is good for upgarde.
    pkg update && pkg upgrade -y

  • Rebel Alliance Developer Netgate

    See above, that is not the recommended procedure.

    Locking this, it's been solved already.

Log in to reply