Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
37c62e42
Commit
37c62e42
authored
Dec 09, 2014
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tmp: not needed
parent
2862298e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
101 deletions
+0
-101
post_upgrade_command
tmp/post_upgrade_command
+0
-45
post_upgrade_command.php
tmp/post_upgrade_command.php
+0
-26
pre_upgrade_command
tmp/pre_upgrade_command
+0
-30
No files found.
tmp/post_upgrade_command
deleted
100755 → 0
View file @
2862298e
#!/bin/sh
/usr/local/etc/rc.conf_mount_rw
PFSENSETYPE
=
`
cat
/usr/local/etc/platform
`
if
[
$PFSENSETYPE
=
"pfSense"
]
||
[
$PFSENSETYPE
=
"nanobsd"
]
;
then
touch
/conf/needs_package_sync
fi
# Detect interactive logins and display the shell
detect_command
=
'[ -n "$SSH_TTY" -o "$TERM" = "cons25" ] && exec /usr/local/etc/rc.initial'
echo
"
$detect_command
"
>
$CVS_CO_DIR
/root/.shrc
echo
"
$detect_command
"
>>
$CVS_CO_DIR
/root/.profile
# Now turn on or off serial console as needed
echo
"Checking for /tmp/
$1
/tmp/post_upgrade_command.php... "
>>
/conf/upgrade_log.txt
if
[
-x
/tmp/
$1
/tmp/post_upgrade_command.php
]
;
then
echo
"Running /tmp/
$1
/tmp/post_upgrade_command.php
$1
"
>>
/conf/upgrade_log.txt
/tmp/
$1
/tmp/post_upgrade_command.php
$1
>>
/conf/upgrade_log.txt 2>&1
elif
[
-f
/tmp/post_upgrade_command.php
]
;
then
echo
"Running /tmp/post_upgrade_command.php
$1
"
>>
/conf/upgrade_log.txt
/tmp/post_upgrade_command.php
$1
fi
# Remove any previous MD5 sum files
rm
-f
/root/
*
.md5
# File moved to pfSense php shell (pfSsh.php)
rm
-rf
/usr/local/sbin/cvs_sync.sh
# Fixup permissions on installed files
if
[
"
${
PFSENSETYPE
}
"
=
"nanobsd"
]
;
then
MTREECHKDIR
=
/tmp/
${
1
}
/
else
MTREECHKDIR
=
/
fi
if
[
-f
${
MTREECHKDIR
}
etc/installed_filesystem.mtree
]
;
then
/usr/sbin/mtree
-U
-e
-q
-f
${
MTREECHKDIR
}
etc/installed_filesystem.mtree
-p
${
MTREECHKDIR
}
>
/conf/mtree.log
;
fi
;
# Make sure to preserve existing time zone
if
[
"
${
PFSENSETYPE
}
"
=
"nanobsd"
]
&&
[
-f
/etc/localtime
]
;
then
/bin/cp
-p
/etc/localtime /tmp/
${
1
}
/etc/localtime 2>/dev/null
fi
tmp/post_upgrade_command.php
deleted
100755 → 0
View file @
2862298e
#!/usr/local/bin/php -f
<?php
/* upgrade embedded users serial console */
require_once
(
"globals.inc"
);
require_once
(
"config.inc"
);
require_once
(
"functions.inc"
);
if
(
file_exists
(
"/usr/local/bin/git"
)
&&
isset
(
$config
[
'system'
][
'gitsync'
][
'synconupgrade'
]))
{
if
(
!
empty
(
$config
[
'system'
][
'gitsync'
][
'repositoryurl'
]))
exec
(
"cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url "
.
escapeshellarg
(
$config
[
'system'
][
'gitsync'
][
'repositoryurl'
]));
if
(
!
empty
(
$config
[
'system'
][
'gitsync'
][
'branch'
]))
system
(
"pfSsh.php playback gitsync "
.
escapeshellarg
(
$config
[
'system'
][
'gitsync'
][
'branch'
])
.
" --upgrading"
);
}
$newslicedir
=
""
;
if
(
$argv
[
1
]
!=
""
)
$newslicedir
=
'/tmp/'
.
$argv
[
1
];
if
(
$g
[
'enableserial_force'
]
||
file_exists
(
"
{
$newslicedir
}
/enableserial_force"
))
{
$config
[
'system'
][
'enableserial'
]
=
true
;
write_config
();
}
system
(
"echo
\"
Adding serial port settings (
{
$newslicedir
}
)...
\"
>> /conf/upgrade_log.txt"
);
setup_serial_port
(
"upgrade"
,
$newslicedir
);
tmp/pre_upgrade_command
deleted
100644 → 0
View file @
2862298e
#!/bin/sh
/usr/local/etc/rc.conf_mount_rw
# Record the previous version
PRIOR_VERSION
=
`
uname
-r
|
cut
-d
'.'
-f1
`
echo
$PRIOR_VERSION
>
/tmp/pre_upgrade_version
# Hack to workaround ticket #3749
if
[
"
${
PRIOR_VERSION
}
"
=
"8"
]
&&
grep
-q
'sh /usr/local/etc/rc.reboot'
/usr/local/etc/rc.firmware
;
then
PROC
=
$(
ps axwww |
grep
'/usr/local/etc/rc.firmware *pfSenseupgrade'
)
PID
=
''
IMG
=
''
if
[
-n
"
${
PROC
}
"
]
;
then
PID
=
$(
echo
"
${
PROC
}
"
|
awk
'{print $1}'
)
IMG
=
$(
echo
"
${
PROC
}
"
|
sed
's,^.*pfSenseupgrade *,,'
)
fi
if
[
-n
"
${
PID
}
"
-a
-n
"
${
IMG
}
"
-a
-f
"
${
IMG
}
"
]
;
then
cp
-fp
/bin/sh /tmp/sh.old
kill
${
PID
}
>
/dev/null 2>&1
kill
-9
${
PID
}
>
/dev/null 2>&1
sed
-i
''
-e
's,sh /,/tmp/sh.old /,'
/usr/local/etc/rc.firmware
/usr/local/etc/rc.firmware pfSenseupgrade
"
${
IMG
}
"
exit
fi
fi
rm
/boot/kernel/
*
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment