Add $register_shell var, to (un)register shells at post-{inst,rm} for binpkgs.

Multiple shells can be (un)registered by a single package, like:

register_shell="/bin/zsh-foo /bin/zsh-blah"

--HG--
extra : convert_revision : 0172a74b41e26089da97fcdc8cc2d5cb6ae147f2
This commit is contained in:
Juan RP 2009-03-14 07:32:48 +01:00
parent c2228d084b
commit 855ec90fdf
5 changed files with 12 additions and 2 deletions

View File

@ -11,7 +11,6 @@ Packages:
in a package, to know when update it.
* Create /etc/issue.
* Create files in /etc/skel for new users.
* Register shells in /etc/shells.
xbps-bin:
* Add support to handle conf_files and keep_dirs from package metadata.

View File

@ -320,6 +320,15 @@ _EOF
else
rm -f $TMPINFOLIST
fi
# Register the shells into /etc/shells if requested.
if [ -n "${register_shell}" ]; then
triggers="$triggers register-shell"
for f in ${register_shell}; do
echo $f >> $metadir/shells
done
fi
$XBPS_REGPKGDB_CMD sanitize-plist $metadir/files.plist
$XBPS_REGPKGDB_CMD sanitize-plist $metadir/props.plist
chmod 644 $metadir/*

View File

@ -61,7 +61,7 @@ reset_tmpl_vars()
local TMPL_VARS="pkgname distfiles configure_args configure_env \
make_build_args make_install_args build_style \
short_desc maintainer long_desc checksum wrksrc \
patch_files make_cmd base_chroot \
patch_files make_cmd base_chroot register_shell \
make_build_target configure_script \
pre_configure pre_build pre_install post_install \
make_install_target version \

View File

@ -22,6 +22,7 @@ long_desc="
modification."
base_chroot=yes
register_shell="/bin/bash"
Add_dependency run glibc
Add_dependency full ncurses

View File

@ -19,6 +19,7 @@ long_desc="
dash in 2002."
base_chroot=yes
register_shell="/bin/sh"
Add_dependency run glibc
post_install()