wok annotate slitaz-hacker/receipt @ rev 845
firefox-simple-mail: install for Firefox 3.0
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 18 16:56:02 2008 +0200 (2008-05-18) |
parents | 55797d71e25f |
children |
rev | line source |
---|---|
pankso@198 | 1 # SliTaz package receipt. |
pankso@198 | 2 |
pankso@198 | 3 PACKAGE="slitaz-hacker" |
pankso@718 | 4 VERSION="1.5" |
pankso@198 | 5 CATEGORY="base-system" |
pankso@198 | 6 SHORT_DESC="SliTaz user hacker." |
pankso@718 | 7 DEPENDS="slitaz-base-files slitaz-configs" |
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@683 | 16 mkdir -p \ |
pankso@683 | 17 $fs/home/hacker/Documents \ |
pankso@198 | 18 $fs/home/hacker/Downloads \ |
pankso@683 | 19 $fs/home/hacker/Music \ |
pankso@718 | 20 $fs/home/hacker/Videos \ |
pankso@198 | 21 $fs/home/hacker/.local/bin \ |
pankso@683 | 22 $fs/home/hacker/.local/share \ |
pankso@683 | 23 $fs/home/hacker/.mozilla/plugins |
pankso@276 | 24 cp -a stuff/hacker $fs/home |
pankso@213 | 25 # Change permissions. |
pankso@213 | 26 # |
pankso@216 | 27 echo -n "Chmodig all files in $fs/home/hacker..." |
pankso@213 | 28 chown -R 500.500 $fs/home/hacker |
pankso@213 | 29 status |
pankso@198 | 30 } |
pankso@198 | 31 |
pankso@198 | 32 pre_install() |
pankso@198 | 33 { |
pankso@198 | 34 local root |
pankso@198 | 35 root=$1 |
pankso@198 | 36 # Go for echoing on configuration files if any hacker was found. |
pankso@198 | 37 # |
pankso@198 | 38 if ! grep -q hacker $root/etc/passwd; then |
pankso@198 | 39 echo -n "Configuring $root/etc..." |
pankso@198 | 40 echo 'hacker:x:500:500:Linux User,,,:/home/hacker:/bin/ash' >> $root/etc/passwd |
pankso@198 | 41 echo 'hacker::13646:0:99999:7:::' >> $root/etc/shadow |
pankso@198 | 42 echo 'hacker:x:500:' >> $root/etc/group |
pankso@198 | 43 echo 'hacker:!::' >> $root/etc/gshadow |
pankso@198 | 44 status |
pankso@198 | 45 else |
pankso@198 | 46 echo "Hacker is already in : $root/etc/passwd" |
pankso@198 | 47 fi |
pankso@198 | 48 # Hacker can listen to music |
pankso@198 | 49 # |
pankso@198 | 50 if grep -q audio $root/etc/group; then |
pankso@198 | 51 if ! grep -q "audio:x:20:hacker" $root/etc/group; then |
pankso@198 | 52 sed -i s/'audio:x:20:'/'audio:x:20:hacker'/ $root/etc/group |
pankso@198 | 53 fi |
pankso@198 | 54 fi |
pankso@212 | 55 } |