diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-07-11 07:48:52 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-07-11 08:23:04 -0300 |
commit | 5fbdacc1ec787ddb911a4b5d5d2adb93819efe04 (patch) | |
tree | 411f097d94f43a9673991c3638a9c523a3582297 /etc | |
parent | 00aa34f15405413ccca21707d797a6918c870cdb (diff) | |
download | pfsense-5fbdacc1ec787ddb911a4b5d5d2adb93819efe04.zip pfsense-5fbdacc1ec787ddb911a4b5d5d2adb93819efe04.tar.gz |
Make sure scripts have necessary attributes and use its shebang line instead of force sh to call it. This will help to prevent or workaround issues similar to #3749 in the future
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.firmware | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware index 7d183b8..db886b2 100755 --- a/etc/rc.firmware +++ b/etc/rc.firmware @@ -468,7 +468,10 @@ pfSenseupgrade) rm -f $IMG if [ -e /etc/init_bootloader.sh ]; then - sh /etc/init_bootloader.sh >> /conf/upgrade_log.txt 2>&1 + if [ ! -x /etc/init_bootloader.sh ]; then + chmod ug+x /etc/init_bootloader.sh + fi + /etc/init_bootloader.sh >> /conf/upgrade_log.txt 2>&1 fi # Remove saved commit ID for gitsync @@ -477,7 +480,10 @@ pfSenseupgrade) # If /tmp/post_upgrade_command exists after update # then execute the command. if [ -f /tmp/post_upgrade_command ]; then - sh /tmp/post_upgrade_command >> /conf/upgrade_log.txt 2>&1 + if [ ! -x /tmp/post_upgrade_command ]; then + chmod ug+x /tmp/post_upgrade_command + fi + /tmp/post_upgrade_command >> /conf/upgrade_log.txt 2>&1 fi # remove unused files |