From 7c78f2d02f416088f09a606ca243164d2a081c7f Mon Sep 17 00:00:00 2001 From: Kun Chen Date: Mon, 20 Jan 2025 15:00:33 -0800 Subject: [PATCH] add gsh-bin.install file --- gsh-bin.install | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 gsh-bin.install diff --git a/gsh-bin.install b/gsh-bin.install new file mode 100644 index 000000000000..3e845892f7f5 --- /dev/null +++ b/gsh-bin.install @@ -0,0 +1,14 @@ +#!/bin/sh + +post_install() { + grep -qe '^/bin/gsh$' etc/shells || echo '/bin/gsh' >> etc/shells + grep -qe '^/usr/bin/gsh$' etc/shells || echo '/usr/bin/gsh' >> etc/shells +} + +post_upgrade() { + post_install +} + +pre_remove() { + sed -i -r '/^(\/usr)?\/bin\/gsh$/d' etc/shells +}