From 952838bf73d6a919ec54e38202e7eabec0988692 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Mon, 14 Apr 2025 10:18:06 +0100 Subject: packaging: T7336: add missing renamed for the radius-shell package --- debian/radius-shell.install | 1 - debian/radius-shell.manpages | 1 - debian/radius-shell.postinst | 32 -------------------------------- debian/radius-shell.postrm | 26 -------------------------- debian/vyos-radius-shell.install | 1 + debian/vyos-radius-shell.manpages | 1 + debian/vyos-radius-shell.postinst | 32 ++++++++++++++++++++++++++++++++ debian/vyos-radius-shell.postrm | 26 ++++++++++++++++++++++++++ 8 files changed, 60 insertions(+), 60 deletions(-) delete mode 100644 debian/radius-shell.install delete mode 100644 debian/radius-shell.manpages delete mode 100644 debian/radius-shell.postinst delete mode 100644 debian/radius-shell.postrm create mode 100644 debian/vyos-radius-shell.install create mode 100644 debian/vyos-radius-shell.manpages create mode 100644 debian/vyos-radius-shell.postinst create mode 100644 debian/vyos-radius-shell.postrm diff --git a/debian/radius-shell.install b/debian/radius-shell.install deleted file mode 100644 index 7671d36..0000000 --- a/debian/radius-shell.install +++ /dev/null @@ -1 +0,0 @@ -radius_shell sbin diff --git a/debian/radius-shell.manpages b/debian/radius-shell.manpages deleted file mode 100644 index bb1a970..0000000 --- a/debian/radius-shell.manpages +++ /dev/null @@ -1 +0,0 @@ -radius_shell.8 diff --git a/debian/radius-shell.postinst b/debian/radius-shell.postinst deleted file mode 100644 index 5c766f2..0000000 --- a/debian/radius-shell.postinst +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/sh - -set -e - -# we depend on libnss-mapuser, so that the radius group will have been -# created before this script runs. - -case "$1" in - configure) - radshell=/sbin/radius_shell - chmod 750 $radshell - chgrp users $radshell - setcap cap_setuid+ep $radshell - # The users will have been created by the libnss-mapuser package - # and possibly by an older version, so change the shells here. - # This also prevents a loop in package install ordering dependencies - for usr in radius_user radius_priv_user; do - uent="$(getent -s compat passwd $usr 2>/dev/null)" || true - [ -z "$uent" ] && continue - case "$uent" in - *${radshell}*) ;; - *) chsh -s $radshell $usr ;; - esac - done - if [ -x /usr/sbin/add-shell ]; then - /usr/sbin/add-shell /sbin/radius_shell - fi - ;; -esac - -#DEBHELPER# - diff --git a/debian/radius-shell.postrm b/debian/radius-shell.postrm deleted file mode 100644 index d073b68..0000000 --- a/debian/radius-shell.postrm +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/sh - -set -e - -# we depend on libnss-mapuser, so that the radius group will have been -# created before this script runs. - -case "$1" in - remove|purge) - # fixup the shell for the users we may have modified on installation, - # if still present, and using our shell - for usr in radius_user radius_priv_user; do - uent="$(getent -s compat passwd $usr 2>/dev/null)" || true - [ -z "$uent" ] && continue - case "$uent" in - *${radshell}*) chsh -s /bin/bash $usr ;; - esac - done - if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then - /usr/sbin/remove-shell /sbin/radius_shell - fi - ;; -esac - -#DEBHELPER# - diff --git a/debian/vyos-radius-shell.install b/debian/vyos-radius-shell.install new file mode 100644 index 0000000..7671d36 --- /dev/null +++ b/debian/vyos-radius-shell.install @@ -0,0 +1 @@ +radius_shell sbin diff --git a/debian/vyos-radius-shell.manpages b/debian/vyos-radius-shell.manpages new file mode 100644 index 0000000..bb1a970 --- /dev/null +++ b/debian/vyos-radius-shell.manpages @@ -0,0 +1 @@ +radius_shell.8 diff --git a/debian/vyos-radius-shell.postinst b/debian/vyos-radius-shell.postinst new file mode 100644 index 0000000..5c766f2 --- /dev/null +++ b/debian/vyos-radius-shell.postinst @@ -0,0 +1,32 @@ +#! /bin/sh + +set -e + +# we depend on libnss-mapuser, so that the radius group will have been +# created before this script runs. + +case "$1" in + configure) + radshell=/sbin/radius_shell + chmod 750 $radshell + chgrp users $radshell + setcap cap_setuid+ep $radshell + # The users will have been created by the libnss-mapuser package + # and possibly by an older version, so change the shells here. + # This also prevents a loop in package install ordering dependencies + for usr in radius_user radius_priv_user; do + uent="$(getent -s compat passwd $usr 2>/dev/null)" || true + [ -z "$uent" ] && continue + case "$uent" in + *${radshell}*) ;; + *) chsh -s $radshell $usr ;; + esac + done + if [ -x /usr/sbin/add-shell ]; then + /usr/sbin/add-shell /sbin/radius_shell + fi + ;; +esac + +#DEBHELPER# + diff --git a/debian/vyos-radius-shell.postrm b/debian/vyos-radius-shell.postrm new file mode 100644 index 0000000..d073b68 --- /dev/null +++ b/debian/vyos-radius-shell.postrm @@ -0,0 +1,26 @@ +#! /bin/sh + +set -e + +# we depend on libnss-mapuser, so that the radius group will have been +# created before this script runs. + +case "$1" in + remove|purge) + # fixup the shell for the users we may have modified on installation, + # if still present, and using our shell + for usr in radius_user radius_priv_user; do + uent="$(getent -s compat passwd $usr 2>/dev/null)" || true + [ -z "$uent" ] && continue + case "$uent" in + *${radshell}*) chsh -s /bin/bash $usr ;; + esac + done + if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then + /usr/sbin/remove-shell /sbin/radius_shell + fi + ;; +esac + +#DEBHELPER# + -- cgit v1.2.3