wok-stable view slitaz-hacker/receipt @ rev 743

Add: kbd-busybox syslinux-kbd
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 05 15:30:34 2008 +0000 (2008-05-05)
parents 55797d71e25f
children
line source
1 # SliTaz package receipt.
3 PACKAGE="slitaz-hacker"
4 VERSION="1.5"
5 CATEGORY="base-system"
6 SHORT_DESC="SliTaz user hacker."
7 DEPENDS="slitaz-base-files slitaz-configs"
8 MAINTAINER="pankso@slitaz.org"
9 WEB_SITE="http://www.slitaz.org/"
11 # Rules to gen a SliTaz package suitable for Tazpkg.
12 genpkg_rules()
13 {
14 # /home/hacker directories.
15 #
16 mkdir -p \
17 $fs/home/hacker/Documents \
18 $fs/home/hacker/Downloads \
19 $fs/home/hacker/Music \
20 $fs/home/hacker/Videos \
21 $fs/home/hacker/.local/bin \
22 $fs/home/hacker/.local/share \
23 $fs/home/hacker/.mozilla/plugins
24 cp -a stuff/hacker $fs/home
25 # Change permissions.
26 #
27 echo -n "Chmodig all files in $fs/home/hacker..."
28 chown -R 500.500 $fs/home/hacker
29 status
30 }
32 pre_install()
33 {
34 local root
35 root=$1
36 # Go for echoing on configuration files if any hacker was found.
37 #
38 if ! grep -q hacker $root/etc/passwd; then
39 echo -n "Configuring $root/etc..."
40 echo 'hacker:x:500:500:Linux User,,,:/home/hacker:/bin/ash' >> $root/etc/passwd
41 echo 'hacker::13646:0:99999:7:::' >> $root/etc/shadow
42 echo 'hacker:x:500:' >> $root/etc/group
43 echo 'hacker:!::' >> $root/etc/gshadow
44 status
45 else
46 echo "Hacker is already in : $root/etc/passwd"
47 fi
48 # Hacker can listen to music
49 #
50 if grep -q audio $root/etc/group; then
51 if ! grep -q "audio:x:20:hacker" $root/etc/group; then
52 sed -i s/'audio:x:20:'/'audio:x:20:hacker'/ $root/etc/group
53 fi
54 fi
55 }