wok-current annotate slitaz-hacker/receipt @ rev 646
Up: cdrkit (1.1.7.1)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 22 18:51:13 2008 +0200 (2008-04-22) |
parents | b6f178928394 |
children | eb9854374fce |
rev | line source |
---|---|
pankso@198 | 1 # SliTaz package receipt. |
pankso@198 | 2 |
pankso@198 | 3 PACKAGE="slitaz-hacker" |
pankso@561 | 4 VERSION="1.2" |
pankso@198 | 5 CATEGORY="base-system" |
pankso@198 | 6 SHORT_DESC="SliTaz user hacker." |
pankso@561 | 7 DEPENDS="slitaz-base-files lxappearance" |
pankso@198 | 8 MAINTAINER="pankso@slitaz.org" |
pankso@198 | 9 WEB_SITE="http://www.slitaz.org/" |
pankso@198 | 10 |
pankso@198 | 11 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@198 | 12 genpkg_rules() |
pankso@198 | 13 { |
pankso@198 | 14 # /home/hacker directories. |
pankso@198 | 15 # |
pankso@198 | 16 mkdir -p $fs/home/hacker/Documents \ |
pankso@198 | 17 $fs/home/hacker/Downloads \ |
pankso@198 | 18 $fs/home/hacker/Templates \ |
pankso@198 | 19 $fs/home/hacker/.local/bin \ |
pankso@198 | 20 $fs/home/hacker/.local/share |
pankso@276 | 21 cp -a stuff/hacker $fs/home |
pankso@213 | 22 # Change permissions. |
pankso@213 | 23 # |
pankso@216 | 24 echo -n "Chmodig all files in $fs/home/hacker..." |
pankso@213 | 25 chown -R 500.500 $fs/home/hacker |
pankso@213 | 26 status |
pankso@198 | 27 } |
pankso@198 | 28 |
pankso@198 | 29 pre_install() |
pankso@198 | 30 { |
pankso@198 | 31 local root |
pankso@198 | 32 root=$1 |
pankso@198 | 33 # Go for echoing on configuration files if any hacker was found. |
pankso@198 | 34 # |
pankso@198 | 35 if ! grep -q hacker $root/etc/passwd; then |
pankso@198 | 36 echo -n "Configuring $root/etc..." |
pankso@198 | 37 echo 'hacker:x:500:500:Linux User,,,:/home/hacker:/bin/ash' >> $root/etc/passwd |
pankso@198 | 38 echo 'hacker::13646:0:99999:7:::' >> $root/etc/shadow |
pankso@198 | 39 echo 'hacker:x:500:' >> $root/etc/group |
pankso@198 | 40 echo 'hacker:!::' >> $root/etc/gshadow |
pankso@198 | 41 status |
pankso@198 | 42 else |
pankso@198 | 43 echo "Hacker is already in : $root/etc/passwd" |
pankso@198 | 44 fi |
pankso@198 | 45 # Hacker can listen to music |
pankso@198 | 46 # |
pankso@198 | 47 if grep -q audio $root/etc/group; then |
pankso@198 | 48 if ! grep -q "audio:x:20:hacker" $root/etc/group; then |
pankso@198 | 49 sed -i s/'audio:x:20:'/'audio:x:20:hacker'/ $root/etc/group |
pankso@198 | 50 fi |
pankso@198 | 51 fi |
pankso@212 | 52 } |