Project

General

Profile

« Previous | Next » 

Revision 31c8b40b

Added by Renato Botelho over 7 years ago

Only show copynotice when version changes

View differences:

src/etc/pfSense.obsoletedfiles
832 832
/usr/local/www/classes/maintable.inc
833 833
/usr/local/www/code-syntax-highlighter
834 834
/usr/local/www/copyright-master.txt
835
/usr/local/www/copynotice.old
835 836
/usr/local/www/csrf/csrf-secret.php
836 837
/usr/local/www/css/table.css
837 838
/usr/local/www/d3pie
src/usr/local/www/index.php
489 489
</div>
490 490

  
491 491
<?php
492
// Import the modal form used to display the copyright/usage information, then rename it
493
// This should cause it to display only once per install or update
494
if (file_exists('/usr/local/www/copynotice.inc')) {
495
	require_once('/usr/local/www/copynotice.inc');
496
	rename('/usr/local/www/copynotice.inc', '/usr/local/www/copynotice.old');
492
/*
493
 * Import the modal form used to display the copyright/usage information
494
 * when trigger file exists. Trigger file is created during upgrade process
495
 * when /etc/version changes
496
 */
497
if (file_exists("{$g['cf_conf_path']}/copynotice_display")) {
498
	require_once("{$g['www_path']}/copynotice.inc");
499
	@unlink("{$g['cf_conf_path']}/copynotice_display");
497 500
}
498 501
?>
499 502

  
tools/templates/core_pkg/base/metadir/+INSTALL
9 9
	exit 1
10 10
fi
11 11

  
12
# Save a copy of /etc/version to trigger copynotice.inc show when it's needed
13
unset first_copynotice
14
if [ ! -f /cf/conf/copynotice_version ]; then
15
	first_copynotice=1
16
fi
17
/bin/cp -f /etc/version /cf/conf/copynotice_version
18

  
12 19
echo %%PRODUCT_NAME%% > /etc/platform
13 20

  
14 21
echo "===> Removing schg flag from base files"
......
30 37
tar -C / --exclude ./var/empty -xJPUf \
31 38
	/usr/local/share/%%PRODUCT_NAME%%/base.txz
32 39

  
40
# Create/remove trigger to show copynotice when version changes
41
/usr/bin/cmp -s /etc/version /cf/conf/copynotice_version
42
if [ $? -ne 0 -o -n "${first_copynotice}" ]; then
43
	/usr/bin/touch /cf/conf/copynotice_display
44
else
45
	/bin/rm -f /cf/conf/copynotice_display >/dev/null 2>&1
46
fi
47

  
33 48
echo "===> Removing static obsoleted files"
34 49

  
35 50
# Set IFS to \n to deal with filenames containing spaces

Also available in: Unified diff