Add 'etcupdate' command, update bundled files
Add `etcupdate` missing command, update bundled files.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.2.25......Add 'etcupdate' missing command, update bundled files.
|
||||||
1.2.24......Minor code changes/improvements.
|
1.2.24......Minor code changes/improvements.
|
||||||
1.2.23......Check/update bastille config parameters on runtime.
|
1.2.23......Check/update bastille config parameters on runtime.
|
||||||
1.2.22......Make sure minor changes are always applied.
|
1.2.22......Make sure minor changes are always applied.
|
||||||
|
|||||||
+18
-3
@@ -470,6 +470,7 @@ include_files()
|
|||||||
# Include missing system files.
|
# Include missing system files.
|
||||||
# Symlink the files in embedded platforms.
|
# Symlink the files in embedded platforms.
|
||||||
USRBIN_FILES="ar diff3 makewhatis setfib sum"
|
USRBIN_FILES="ar diff3 makewhatis setfib sum"
|
||||||
|
USRSBIN_FILES="etcupdate"
|
||||||
LOCALBIN_FILES="jib"
|
LOCALBIN_FILES="jib"
|
||||||
if [ "${PRDPLATFORM}" = "x64-embedded" ]; then
|
if [ "${PRDPLATFORM}" = "x64-embedded" ]; then
|
||||||
for _usrbin_file in ${USRBIN_FILES}; do
|
for _usrbin_file in ${USRBIN_FILES}; do
|
||||||
@@ -481,6 +482,15 @@ include_files()
|
|||||||
ln -fhs ${SYSTEM_INCLUDE}/${_usrbin_file} /usr/bin/${_usrbin_file}
|
ln -fhs ${SYSTEM_INCLUDE}/${_usrbin_file} /usr/bin/${_usrbin_file}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
for _usrsbin_file in ${USRSBIN_FILES}; do
|
||||||
|
if [ -f "/usr/sbin/${_usrsbin_file}" ] && [ ! -L "/usr/sbin/${_usrsbin_file}" ]; then
|
||||||
|
rm -r /usr/sbin/${_usrsbin_file}
|
||||||
|
fi
|
||||||
|
if [ ! -f "/usr/sbin/${_usrsbin_file}" ]; then
|
||||||
|
chmod 0555 "${SYSTEM_INCLUDE}/${_usrsbin_file}"
|
||||||
|
ln -fhs ${SYSTEM_INCLUDE}/${_usrsbin_file} /usr/sbin/${_usrsbin_file}
|
||||||
|
fi
|
||||||
|
done
|
||||||
for _localbin_file in ${LOCALBIN_FILES}; do
|
for _localbin_file in ${LOCALBIN_FILES}; do
|
||||||
if [ -f "/usr/local/bin/${_localbin_file}" ] && [ ! -L "/usr/local/bin/${_localbin_file}" ]; then
|
if [ -f "/usr/local/bin/${_localbin_file}" ] && [ ! -L "/usr/local/bin/${_localbin_file}" ]; then
|
||||||
rm -r /usr/local/bin/${_localbin_file}
|
rm -r /usr/local/bin/${_localbin_file}
|
||||||
@@ -497,6 +507,11 @@ include_files()
|
|||||||
install -m 0555 "${SYSTEM_INCLUDE}/${_usrbin_file}" /usr/bin/${_usrbin_file}
|
install -m 0555 "${SYSTEM_INCLUDE}/${_usrbin_file}" /usr/bin/${_usrbin_file}
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
for _usrsbin_file in ${USRSBIN_FILES}; do
|
||||||
|
if [ ! -f "/usr/sbin/${_usrsbin_file}" ]; then
|
||||||
|
install -m 0555 "${SYSTEM_INCLUDE}/${_usrsbin_file}" /usr/sbin/${_usrsbin_file}
|
||||||
|
fi
|
||||||
|
done
|
||||||
for _localbin_file in ${LOCALBIN_FILES}; do
|
for _localbin_file in ${LOCALBIN_FILES}; do
|
||||||
if [ ! -f "/usr/local/bin/${_localbin_file}" ]; then
|
if [ ! -f "/usr/local/bin/${_localbin_file}" ]; then
|
||||||
install -m 0544 ${SYSTEM_INCLUDE}/${_localbin_file} /usr/local/bin/${_localbin_file}
|
install -m 0544 ${SYSTEM_INCLUDE}/${_localbin_file} /usr/local/bin/${_localbin_file}
|
||||||
@@ -993,7 +1008,7 @@ zfs_activate()
|
|||||||
done
|
done
|
||||||
echo "Proceeding..."
|
echo "Proceeding..."
|
||||||
|
|
||||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
if [ "${bastille_zfs_enable}" = "YES" ] || [ "${bastille_zfs_enable}" = "yes" ]; then
|
||||||
if [ -n "${bastille_zfs_zpool}" ]; then
|
if [ -n "${bastille_zfs_zpool}" ]; then
|
||||||
if zfs list "${bastille_zfs_zpool}" > /dev/null 2>&1; then
|
if zfs list "${bastille_zfs_zpool}" > /dev/null 2>&1; then
|
||||||
if ! zfs list "${bastille_zfs_zpool}/${bastille_zfs_prefix}" > /dev/null 2>&1; then
|
if ! zfs list "${bastille_zfs_zpool}/${bastille_zfs_prefix}" > /dev/null 2>&1; then
|
||||||
@@ -1343,7 +1358,7 @@ rc_params()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for sane ZFS parameters in this setup.
|
# Check for sane ZFS parameters in this setup.
|
||||||
if [ "${bastille_zfs_enable}" = "YES" ]; then
|
if [ "${bastille_zfs_enable}" = "YES" ] || [ "${bastille_zfs_enable}" = "yes" ]; then
|
||||||
if [ -n "${bastille_zfs_zpool}" ]; then
|
if [ -n "${bastille_zfs_zpool}" ]; then
|
||||||
if zfs list "${bastille_zfs_zpool}" >/dev/null 2>&1; then
|
if zfs list "${bastille_zfs_zpool}" >/dev/null 2>&1; then
|
||||||
|
|
||||||
@@ -1397,7 +1412,7 @@ rc_params()
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Check for orphaned configuration and/or config reset.
|
# Check for orphaned configuration and/or config reset.
|
||||||
if zfs list -H "${CWDIR}" | awk '{print $1}' | grep -qw "${DAFAULT_BASTILLE_PREFIX}"; then
|
if zfs list -H "${CWDIR}" 2>/dev/null | awk '{print $1}' | grep -qw "${DAFAULT_BASTILLE_PREFIX}"; then
|
||||||
zfs_support_error
|
zfs_support_error
|
||||||
else
|
else
|
||||||
if [ "${bastille_zfs_enable}" = "NO" ] || [ "${bastille_zfs_enable}" = "no" ]; then
|
if [ "${bastille_zfs_enable}" = "NO" ] || [ "${bastille_zfs_enable}" = "no" ]; then
|
||||||
|
|||||||
@@ -1046,6 +1046,26 @@ IDS_check_params () {
|
|||||||
fetch_setup_verboselevel
|
fetch_setup_verboselevel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Packaged base and freebsd-update are incompatible. Exit with an error if
|
||||||
|
# packaged base is in use.
|
||||||
|
check_pkgbase()
|
||||||
|
{
|
||||||
|
# Packaged base requires that pkg is bootstrapped.
|
||||||
|
if ! pkg -c ${BASEDIR} -N >/dev/null 2>/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
# uname(1) is used by pkg to determine ABI, so it should exist.
|
||||||
|
# If it comes from a package then this system uses packaged base.
|
||||||
|
if ! pkg -c ${BASEDIR} which /usr/bin/uname >/dev/null; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
cat <<EOF
|
||||||
|
freebsd-update is incompatible with the use of packaged base. Please see
|
||||||
|
https://wiki.freebsd.org/PkgBase for more information.
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
#### Core functionality -- the actual work gets done here
|
#### Core functionality -- the actual work gets done here
|
||||||
|
|
||||||
# Use an SRV query to pick a server. If the SRV query doesn't provide
|
# Use an SRV query to pick a server. If the SRV query doesn't provide
|
||||||
@@ -3043,10 +3063,28 @@ Kernel updates have been installed. Please reboot and run
|
|||||||
grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW
|
grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW
|
||||||
install_from_index INDEX-NEW || return 1
|
install_from_index INDEX-NEW || return 1
|
||||||
|
|
||||||
# Install new shared libraries next
|
# Next, in order, libsys, libc, and libthr.
|
||||||
grep -vE '^/boot/' $1/INDEX-NEW |
|
grep -vE '^/boot/' $1/INDEX-NEW |
|
||||||
grep -vE '^[^|]+\|d\|' |
|
grep -vE '^[^|]+\|d\|' |
|
||||||
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
|
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
|
||||||
|
grep -E '^[^|]*/lib/libsys\.so\.[0-9]+\|' > INDEX-NEW
|
||||||
|
install_from_index INDEX-NEW || return 1
|
||||||
|
grep -vE '^/boot/' $1/INDEX-NEW |
|
||||||
|
grep -vE '^[^|]+\|d\|' |
|
||||||
|
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
|
||||||
|
grep -E '^[^|]*/lib/libc\.so\.[0-9]+\|' > INDEX-NEW
|
||||||
|
install_from_index INDEX-NEW || return 1
|
||||||
|
grep -vE '^/boot/' $1/INDEX-NEW |
|
||||||
|
grep -vE '^[^|]+\|d\|' |
|
||||||
|
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
|
||||||
|
grep -E '^[^|]*/lib/libthr\.so\.[0-9]+\|' > INDEX-NEW
|
||||||
|
install_from_index INDEX-NEW || return 1
|
||||||
|
|
||||||
|
# Install the rest of the shared libraries next
|
||||||
|
grep -vE '^/boot/' $1/INDEX-NEW |
|
||||||
|
grep -vE '^[^|]+\|d\|' |
|
||||||
|
grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' |
|
||||||
|
grep -vE '^[^|]*/lib/(libsys|libc|libthr)\.so\.[0-9]+\|' |
|
||||||
grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
|
grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW
|
||||||
install_from_index INDEX-NEW || return 1
|
install_from_index INDEX-NEW || return 1
|
||||||
|
|
||||||
@@ -3541,6 +3579,9 @@ export LC_ALL=C
|
|||||||
# Clear environment variables that may affect operation of tools that we use.
|
# Clear environment variables that may affect operation of tools that we use.
|
||||||
unset GREP_OPTIONS
|
unset GREP_OPTIONS
|
||||||
|
|
||||||
|
# Disallow use with packaged base.
|
||||||
|
check_pkgbase
|
||||||
|
|
||||||
get_params $@
|
get_params $@
|
||||||
for COMMAND in ${COMMANDS}; do
|
for COMMAND in ${COMMANDS}; do
|
||||||
cmd_${COMMAND}
|
cmd_${COMMAND}
|
||||||
|
|||||||
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
Executable → Regular
BIN
Binary file not shown.
@@ -654,8 +654,9 @@ $document->render();
|
|||||||
html_checkbox2('automount',gettext('Auto-mount Nullfs'),!empty($pconfig['automount']) ? true : false,gettext('Auto-mount the nullfs mountpoint if the container is already running.'),'',true);
|
html_checkbox2('automount',gettext('Auto-mount Nullfs'),!empty($pconfig['automount']) ? true : false,gettext('Auto-mount the nullfs mountpoint if the container is already running.'),'',true);
|
||||||
html_checkbox2('createdir',gettext('Create Target Directory'),!empty($pconfig['createdir']) ? true : true,gettext('Create target directory if missing (recommended).'),'',true);
|
html_checkbox2('createdir',gettext('Create Target Directory'),!empty($pconfig['createdir']) ? true : true,gettext('Create target directory if missing (recommended).'),'',true);
|
||||||
if ($is_thinjail):
|
if ($is_thinjail):
|
||||||
html_checkbox2('update_base',gettext('Base update confirm'),!empty($pconfig['update_base']) ? true : false,gettext('This is a thin container, therefore the base release will be updated, this affects child containers.'),'',true);
|
//html_checkbox2('update_base',gettext('Base update confirm'),!empty($pconfig['update_base']) ? true : false,gettext('This is a thin container, therefore the base release will be updated, this affects child containers.'),'',true);
|
||||||
html_checkbox2('update_base_force',gettext('Base update force confirm:'),!empty($pconfig['update_base']) ? true : false,gettext('This will perform a forced base update, this affects child containers.'),'',true);
|
//html_checkbox2('update_base_force',gettext('Base update force confirm:'),!empty($pconfig['update_base']) ? true : false,gettext('This will perform a forced base update, this affects child containers.'),'',true);
|
||||||
|
html_text2('update_base',gettext('Container Update'),htmlspecialchars("This is a thin container, the host is missing some core components to manage updates on this containers, therefore this containers has to be manually upgraded from the command-line."));
|
||||||
else:
|
else:
|
||||||
html_checkbox2('update_jail',gettext('Container update confirm:'),!empty($pconfig['update_jail']) ? true : false,gettext('This is a thick container, therefore the update will be performed within its root, current containers are not affected.'),'',true);
|
html_checkbox2('update_jail',gettext('Container update confirm:'),!empty($pconfig['update_jail']) ? true : false,gettext('This is a thick container, therefore the update will be performed within its root, current containers are not affected.'),'',true);
|
||||||
html_checkbox2('update_jail_force',gettext('Container update force confirm:'),!empty($pconfig['update_jail']) ? true : false,gettext('This will perform a forced jail update, current containers are not affected.'),'',true);
|
html_checkbox2('update_jail_force',gettext('Container update force confirm:'),!empty($pconfig['update_jail']) ? true : false,gettext('This will perform a forced jail update, current containers are not affected.'),'',true);
|
||||||
|
|||||||
Reference in New Issue
Block a user