Compare commits

...

5 Commits

Author SHA1 Message Date
William Hubbs
3e5420b911 version 0.45.2 2022-07-03 12:54:05 -05:00
psykose
9666279210 fix quoting of loggers in start-stop-daemon
previously broken in 6034866d1c
caused *_logger options to be passed unquoted, so
`error_logger="logger -t .."` would pass -t to s-s-d and fail to start
the service.

Fixes: #531
2022-07-03 12:50:51 -05:00
William Hubbs
c7032602dd version 0.45.1 2022-06-10 10:40:38 -05:00
William Hubbs
c253eb0412 restore the init symlink for sysvinit mode
This symlink got lost in the transition to meson.

X-Gentoo-Bug: 850754
X-Gentoo-Bug-URL: https://bugs.gentoo.org/850754
2022-06-10 10:35:08 -05:00
William Hubbs
8accc2d780 clean up hostname service script
- use _ throw-away variable to get rid of a shellcheck warning
- remove tests for /etc/hostname and just try to read it
- drop reference to bash HOSTNAME variable.
- make source of host name more accurate

X-Gentoo-Bug: 850577
X-Gentoo-Bug-URL: https://bugs.gentoo.org/850577
2022-06-10 10:35:08 -05:00
4 changed files with 20 additions and 15 deletions

View File

@@ -19,20 +19,18 @@ depend()
start()
{
local h source x
if [ -s /etc/hostname ] && [ -r /etc/hostname ]; then
read h x </etc/hostname
source="from /etc/hostname"
else
# HOSTNAME variable used to be defined in caps in conf.d/hostname.
# It is also a magic variable in bash.
h=${hostname:-${HOSTNAME}} # checkbashisms: false positive (HOSTNAME var)
local h source
if read -r h _ 2> /dev/null < @SYSCONFDIR@/hostname; then
source="@SYSCONFDIR@/hostname"
elif [ -n "${hostname}" ]; then
h=${hostname}
source="@SYSCONFDIR@/conf.d/${RC_SVCNAME}"
fi
if [ -z "$h" ]; then
einfo "Using default system hostname"
return 0
fi
ebegin "Setting hostname to $h $source"
ebegin "Setting hostname to $h from $source"
hostname "$h"
eend $? "Failed to set the hostname"
}

View File

@@ -1,5 +1,5 @@
project('OpenRC', 'c',
version : '0.45',
version : '0.45.2',
license: 'BSD-2',
default_options : [
'c_std=c99',
@@ -226,4 +226,6 @@ meson.add_install_script('tools/meson_runlevels.sh',
get_option('sysvinit') ? 'yes' : 'no')
meson.add_install_script('tools/meson_final.sh',
rc_libexecdir,
os)
sbindir,
os,
get_option('sysvinit') ? 'yes' : 'no')

View File

@@ -47,8 +47,8 @@ ssd_start()
${directory:+--chdir} $directory \
${output_log+--stdout} $output_log \
${error_log+--stderr} $error_log \
${output_logger:+--stdout-logger} "$output_logger" \
${error_logger:+--stderr-logger} "$error_logger" \
${output_logger:+--stdout-logger \"$output_logger\"} \
${error_logger:+--stderr-logger \"$error_logger\"} \
${capabilities+--capabilities} "$capabilities" \
${secbits:+--secbits} "$secbits" \
${no_new_privs:+--no-new-privs} \

View File

@@ -4,10 +4,15 @@ set -e
set -u
rc_libexecdir="$1"
os="$2"
sbindir="$2"
os="$3"
sysvinit="$4"
if [ ${os} != Linux ]; then
if [ "${os}" != Linux ]; then
install -d "${DESTDIR}/${rc_libexecdir}"/init.d
fi
install -d "${DESTDIR}/${rc_libexecdir}"/tmp
install -m 644 "${MESON_BUILD_ROOT}/src/shared/version" "${DESTDIR}/${rc_libexecdir}"
if [ "${os}" = Linux ] && [ "${sysvinit}" = yes ]; then
ln -s openrc-init "${DESTDIR}/${sbindir}"/init
fi