wok-current view slitaz-hacker/receipt @ rev 268
UPD: portmap
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Mon Feb 25 08:41:37 2008 +0100 (2008-02-25) |
parents | c738ab213d83 |
children | f7cff624b2d2 |
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-hacker"
4 VERSION="1.0"
5 CATEGORY="base-system"
6 SHORT_DESC="SliTaz user hacker."
7 MAINTAINER="pankso@slitaz.org"
8 WEB_SITE="http://www.slitaz.org/"
10 # Rules to gen a SliTaz package suitable for Tazpkg.
11 genpkg_rules()
12 {
13 # /home/hacker directories.
14 #
15 mkdir -p $fs/home/hacker/Documents \
16 $fs/home/hacker/Downloads \
17 $fs/home/hacker/Templates \
18 $fs/home/hacker/.local/bin \
19 $fs/home/hacker/.local/share
20 cp -a stuff/ash_history $fs/home/hacker/.ash_history
21 cp -a stuff/profile $fs/home/hacker/.profile
22 # Change permissions.
23 #
24 echo -n "Chmodig all files in $fs/home/hacker..."
25 chown -R 500.500 $fs/home/hacker
26 status
27 }
29 pre_install()
30 {
31 local root
32 root=$1
33 # Go for echoing on configuration files if any hacker was found.
34 #
35 if ! grep -q hacker $root/etc/passwd; then
36 echo -n "Configuring $root/etc..."
37 echo 'hacker:x:500:500:Linux User,,,:/home/hacker:/bin/ash' >> $root/etc/passwd
38 echo 'hacker::13646:0:99999:7:::' >> $root/etc/shadow
39 echo 'hacker:x:500:' >> $root/etc/group
40 echo 'hacker:!::' >> $root/etc/gshadow
41 status
42 else
43 echo "Hacker is already in : $root/etc/passwd"
44 fi
45 # Hacker can listen to music
46 #
47 if grep -q audio $root/etc/group; then
48 if ! grep -q "audio:x:20:hacker" $root/etc/group; then
49 sed -i s/'audio:x:20:'/'audio:x:20:hacker'/ $root/etc/group
50 fi
51 fi
52 }