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