blob: 70a21ad4fd4b9b00e51861fa021c116afd7e2d73 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# $FreeBSD$
#
# MAINTAINER: portmgr@FreeBSD.org
#
# @shell bin/shell
#
# Handle adding and remove a path to a shell binary into /etc/shells
# it replaces the following code:
#
# bin/shell
# @exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
# @unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
actions: [file]
post-install: <<EOD
cp /etc/shells /etc/shells.bak
(grep -v %D/%@ /etc/shells.bak; echo %D/%@) > /etc/shells
rm -f /etc/shells.bak
EOD
pre-deinstall: <<EOD
cp /etc/shells /etc/shells.bak
grep -v %D/%@ /etc/shells.bak > /etc/shells
rm -f /etc/shells.bak
EOD
|