mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
pkg: split @shadow and @sample syntax, slight differences
Can't guarantee this is the final state, but opnsense-bootstrap stopping over lingering repository information without the finger- prints in place is not very helpful either. Now we have a working copy of the file we need, it is already reconfigured after install and it now also reverts FreeBSD.conf back to its required state--which is off--to prevent problems.
This commit is contained in:
parent
39628cd7f3
commit
72e462453a
@ -9,7 +9,7 @@
|
||||
# Where file1 is considered as a sample file and file2 the target file
|
||||
#
|
||||
# This will install the somefile.conf.sample and automatically copy to
|
||||
# somefile.conf if it doesn't exist. On deinstall it will be kept.
|
||||
# somefile.conf if it doesn't exist. On deinstall it will be removed.
|
||||
#
|
||||
# This replaces the old pattern:
|
||||
# @unexec if cmp -s %D/etc/pkgtools.conf %D/etc/pkgtools.conf.sample; then rm -f %D/etc/pkgtools.conf; fi
|
||||
@ -51,4 +51,5 @@ pre-deinstall: <<EOD
|
||||
/*) target_file="${target_file}" ;;
|
||||
*) target_file="%D/${target_file}" ;;
|
||||
esac
|
||||
rm -f "${target_file}"
|
||||
EOD
|
||||
|
||||
@ -69,6 +69,10 @@ install-${TARGET}: force
|
||||
mv -v "${DESTDIR}${ROOT_${TARGET}}/${TREE}/$${FILE}" \
|
||||
"${DESTDIR}${ROOT_${TARGET}}/${TREE}/$${FILE%%.sample}"; \
|
||||
fi; \
|
||||
if [ -n "${NO_SAMPLE}" -a "$${FILE%%.shadow}" != "$${FILE}" ]; then \
|
||||
mv -v "${DESTDIR}${ROOT_${TARGET}}/${TREE}/$${FILE}" \
|
||||
"${DESTDIR}${ROOT_${TARGET}}/${TREE}/$${FILE%%.shadow}"; \
|
||||
fi; \
|
||||
done
|
||||
.endfor
|
||||
|
||||
@ -77,10 +81,15 @@ plist-${TARGET}: force
|
||||
@(cd ${TREE}; find * -type f ${_IGNORES}) | while read FILE; do \
|
||||
FILE="$${FILE%%.in}"; PREFIX=""; \
|
||||
if [ -z "${NO_SAMPLE}" -a "$${FILE%%.sample}" != "$${FILE}" ]; then \
|
||||
PREFIX="@sample "; \
|
||||
fi; \
|
||||
if [ -z "${NO_SAMPLE}" -a "$${FILE%%.shadow}" != "$${FILE}" ]; then \
|
||||
FILE="$${FILE%%.shadow}.sample"; \
|
||||
PREFIX="@shadow "; \
|
||||
fi; \
|
||||
if [ -n "${NO_SAMPLE}" ]; then \
|
||||
FILE="$${FILE%%.sample}"; \
|
||||
FILE="$${FILE%%.shadow}"; \
|
||||
fi; \
|
||||
echo "$${PREFIX}${ROOT_${TARGET}}/${TREE}/$${FILE}"; \
|
||||
done
|
||||
|
||||
6
plist
6
plist
@ -1133,8 +1133,8 @@
|
||||
/usr/local/www/widgets/widgets/traffic_graphs.widget.php
|
||||
/usr/local/www/wizard.php
|
||||
/usr/local/www/xmlrpc.php
|
||||
@shadow /usr/local/etc/bogons.sample
|
||||
@shadow /usr/local/etc/bogonsv6.sample
|
||||
@shadow /usr/local/etc/config.xml.sample
|
||||
@sample /usr/local/etc/bogons.sample
|
||||
@sample /usr/local/etc/bogonsv6.sample
|
||||
@sample /usr/local/etc/config.xml.sample
|
||||
@shadow /usr/local/etc/pkg/repos/FreeBSD.conf.sample
|
||||
@shadow /usr/local/etc/pkg/repos/origin.conf.sample
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user