diff options
| -rw-r--r-- | meta-networking/recipes-connectivity/freeradius/files/radiusd.service | 3 | ||||
| -rw-r--r-- | meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb | 30 |
2 files changed, 32 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/meta-networking/recipes-connectivity/freeradius/files/radiusd.service index 37a2eb3d7d..7969bfb690 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/radiusd.service +++ b/meta-networking/recipes-connectivity/freeradius/files/radiusd.service | |||
| @@ -4,10 +4,11 @@ After=syslog.target network.target | |||
| 4 | 4 | ||
| 5 | [Service] | 5 | [Service] |
| 6 | Type=forking | 6 | Type=forking |
| 7 | EnvironmentFile=-/etc/sysconfig/radiusd | ||
| 7 | PIDFile=/run/radiusd/radiusd.pid | 8 | PIDFile=/run/radiusd/radiusd.pid |
| 8 | ExecStartPre=-@BASE_BINDIR@/chown -R radiusd:radiusd /run/radiusd | 9 | ExecStartPre=-@BASE_BINDIR@/chown -R radiusd:radiusd /run/radiusd |
| 9 | ExecStartPre=@SBINDIR@/radiusd -C | 10 | ExecStartPre=@SBINDIR@/radiusd -C |
| 10 | ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/raddb | 11 | ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/${MLPREFIX}raddb |
| 11 | ExecReload=@SBINDIR@/radiusd -C | 12 | ExecReload=@SBINDIR@/radiusd -C |
| 12 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID | 13 | ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID |
| 13 | 14 | ||
diff --git a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb index 1407b798b5..b459412e04 100644 --- a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb +++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb | |||
| @@ -199,7 +199,37 @@ pkg_postinst:${PN} () { | |||
| 199 | # Fix ownership for /etc/raddb/*, /var/lib/radiusd | 199 | # Fix ownership for /etc/raddb/*, /var/lib/radiusd |
| 200 | chown -R radiusd:radiusd ${raddbdir} | 200 | chown -R radiusd:radiusd ${raddbdir} |
| 201 | chown -R radiusd:radiusd ${localstatedir}/lib/radiusd | 201 | chown -R radiusd:radiusd ${localstatedir}/lib/radiusd |
| 202 | |||
| 203 | # for radiusd.service with multilib | ||
| 204 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 205 | install -d ${sysconfdir}/sysconfig | ||
| 206 | echo "MLPREFIX=${MLPREFIX}" > ${sysconfdir}/sysconfig/radiusd | ||
| 207 | fi | ||
| 208 | else | ||
| 209 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 210 | install -d $D${sysconfdir}/sysconfig | ||
| 211 | echo "MLPREFIX=${MLPREFIX}" > $D${sysconfdir}/sysconfig/radiusd | ||
| 212 | fi | ||
| 213 | fi | ||
| 214 | } | ||
| 215 | |||
| 216 | pkg_postrm:${PN} () { | ||
| 217 | # only try to remove ${sysconfdir}/sysconfig/radiusd for systemd | ||
| 218 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then | ||
| 219 | exit 0 | ||
| 220 | fi | ||
| 221 | |||
| 222 | if [ -d ${sysconfdir}/raddb ]; then | ||
| 223 | exit 0 | ||
| 202 | fi | 224 | fi |
| 225 | for variant in ${MULTILIB_GLOBAL_VARIANTS}; do | ||
| 226 | if [ -d ${sysconfdir}/${variant}-raddb ]; then | ||
| 227 | exit 0 | ||
| 228 | fi | ||
| 229 | done | ||
| 230 | |||
| 231 | rm -f ${sysconfdir}/sysconfig/radiusd | ||
| 232 | rmdir --ignore-fail-on-non-empty ${sysconfdir}/sysconfig | ||
| 203 | } | 233 | } |
| 204 | 234 | ||
| 205 | # We really need the symlink :( | 235 | # We really need the symlink :( |
