wok-6.x annotate slitaz-hacker/receipt @ rev 232
Slitaz-loram: do not trust mksquashfs status
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 16 23:00:26 2008 +0100 (2008-02-16) |
parents | c738ab213d83 |
children | f7cff624b2d2 |
rev | line source |
---|---|
pankso@198 | 1 # SliTaz package receipt. |
pankso@198 | 2 |
pankso@198 | 3 PACKAGE="slitaz-hacker" |
pankso@198 | 4 VERSION="1.0" |
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@199 | 20 cp -a stuff/ash_history $fs/home/hacker/.ash_history |
pankso@199 | 21 cp -a stuff/profile $fs/home/hacker/.profile |
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 } |