slitaz-forge rev 239
tank: use real name in gecos filed and put files in /etc/skel
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Apr 07 22:10:27 2012 +0200 (2012-04-07) |
parents | a870612e2065 |
children | 49aa1db4bf6e |
files | pkgs/README pkgs/search.sh tank/files/etc/skel/Public/index.html tank/files/etc/skel/Public/profile.php tank/files/etc/skel/README tank/files/usr/share/tank/Public/index.html tank/files/usr/share/tank/Public/profile.php tank/files/usr/share/tank/README tank/tank |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/pkgs/README Sat Apr 07 22:10:27 2012 +0200 1.3 @@ -0,0 +1,18 @@ 1.4 +SliTaz Packages web interface 1.5 +================================================================================ 1.6 + 1.7 + 1.8 +This is TazPKG web interface with a search engine for packages, files, 1.9 +dependencies and more. 1.10 + 1.11 + 1.12 +TODO 1.13 +---- 1.14 + 1.15 + * Use GET so we can copy past urls from a browser 1.16 + * Gettextise the search engine and use PO files 1.17 + * Add package page with all info and an install link 1.18 + (tazpkg:// or tazpkg: works in Midori 1.19 + 1.20 + 1.21 +================================================================================
2.1 --- a/pkgs/search.sh Sat Apr 07 13:13:51 2012 +0200 2.2 +++ b/pkgs/search.sh Sat Apr 07 22:10:27 2012 +0200 2.3 @@ -15,6 +15,7 @@ 2.4 OBJECT=$object 2.5 DATE=$(date +%Y-%m-%d\ %H:%M:%S) 2.6 VERSION=cooking 2.7 + 2.8 if [ "$REQUEST_METHOD" = "GET" ]; then 2.9 SEARCH="" 2.10 VERBOSE=0
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/tank/files/etc/skel/Public/index.html Sat Apr 07 22:10:27 2012 +0200 3.3 @@ -0,0 +1,36 @@ 3.4 +<html> 3.5 +<head> 3.6 + <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 3.7 + <title>%user% - SliTaz</title> 3.8 + <link rel="stylesheet" type="text/css" href="/slitaz.css" /> 3.9 + <link rel="shortcut icon" href="/favicon.ico" /> 3.10 +</head> 3.11 +<body> 3.12 + 3.13 +<!-- Header --> 3.14 +<div id="header"> 3.15 + <div id="logo"></div> 3.16 + <div id="network"> 3.17 + <a href="http://www.slitaz.org/"> 3.18 + <img src="/images/network.png" alt="network.png" /></a> 3.19 + <a href="http://scn.slitaz.org/">Community</a> 3.20 + <a href="http://doc.slitaz.org/">Doc</a> 3.21 + <a href="http://forum.slitaz.org/">Forum</a> 3.22 + <a href="http://bugs.slitaz.org">Bugs</a> 3.23 + <a href="http://hg.slitaz.org/">Hg</a> 3.24 + </div> 3.25 + <h1><a href="http://people.slitaz.org/">%user% at SliTaz</a></h1> 3.26 +</div> 3.27 + 3.28 +<div id="content"> 3.29 + 3.30 +<!-- Put what ever you want here --> 3.31 + 3.32 +My SliTaz stuff 3.33 + 3.34 +</div> 3.35 + 3.36 +<!-- <div id="footer"></div> --> 3.37 + 3.38 +</body> 3.39 +</html>
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/tank/files/etc/skel/Public/profile.php Sat Apr 07 22:10:27 2012 +0200 4.3 @@ -0,0 +1,13 @@ 4.4 +<?php 4.5 + 4.6 +// Your custom SliTaz profile at http://people.slitaz.org/. This file must 4.7 +// be located at ~/Public/profile.php. You must at least provide your real 4.8 +// name and you can use the $wall variable for a personal message. 4.9 + 4.10 +$name = "Real Name"; 4.11 +$location = ""; 4.12 +$scn_user = ""; 4.13 +$skills = ""; 4.14 +$wall = ""; 4.15 + 4.16 +?>
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/tank/files/etc/skel/README Sat Apr 07 22:10:27 2012 +0200 5.3 @@ -0,0 +1,9 @@ 5.4 +Welcome to Tank! 5.5 +================================================================================ 5.6 + 5.7 +Your Public directory URL is: http://people.slitaz.org/~$USER/ 5.8 + 5.9 +Please complete your public profile in ~/Public/profile.php and feel free 5.10 +to use the service for your needs, if anything goes wrong or is missing 5.11 +please express yourself :-) 5.12 +
6.1 --- a/tank/files/usr/share/tank/Public/index.html Sat Apr 07 13:13:51 2012 +0200 6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 6.3 @@ -1,36 +0,0 @@ 6.4 -<html> 6.5 -<head> 6.6 - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 6.7 - <title>%user% - SliTaz</title> 6.8 - <link rel="stylesheet" type="text/css" href="/slitaz.css" /> 6.9 - <link rel="shortcut icon" href="/favicon.ico" /> 6.10 -</head> 6.11 -<body> 6.12 - 6.13 -<!-- Header --> 6.14 -<div id="header"> 6.15 - <div id="logo"></div> 6.16 - <div id="network"> 6.17 - <a href="http://www.slitaz.org/"> 6.18 - <img src="/images/network.png" alt="network.png" /></a> 6.19 - <a href="http://scn.slitaz.org/">Community</a> 6.20 - <a href="http://doc.slitaz.org/">Doc</a> 6.21 - <a href="http://forum.slitaz.org/">Forum</a> 6.22 - <a href="http://bugs.slitaz.org">Bugs</a> 6.23 - <a href="http://hg.slitaz.org/">Hg</a> 6.24 - </div> 6.25 - <h1><a href="http://people.slitaz.org/">%user% at SliTaz</a></h1> 6.26 -</div> 6.27 - 6.28 -<div id="content"> 6.29 - 6.30 -<!-- Put what ever you want here --> 6.31 - 6.32 -My SliTaz stuff 6.33 - 6.34 -</div> 6.35 - 6.36 -<!-- <div id="footer"></div> --> 6.37 - 6.38 -</body> 6.39 -</html>
7.1 --- a/tank/files/usr/share/tank/Public/profile.php Sat Apr 07 13:13:51 2012 +0200 7.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 7.3 @@ -1,13 +0,0 @@ 7.4 -<?php 7.5 - 7.6 -// Your custom SliTaz profile at http://people.slitaz.org/. This file must 7.7 -// be located at ~/Public/profile.php. You must at least provide your real 7.8 -// name and you can use the $wall variable for a personal message. 7.9 - 7.10 -$name = "Real Name"; 7.11 -$location = ""; 7.12 -$scn_user = ""; 7.13 -$skills = ""; 7.14 -$wall = ""; 7.15 - 7.16 -?>
8.1 --- a/tank/files/usr/share/tank/README Sat Apr 07 13:13:51 2012 +0200 8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 8.3 @@ -1,9 +0,0 @@ 8.4 -Welcome to Tank! 8.5 -================================================================================ 8.6 - 8.7 -Your Public directory URL is: http://people.slitaz.org/~$USER/ 8.8 - 8.9 -Please complete your public profile in ~/Public/profile.php and feel free 8.10 -to use the service for your needs, if anything goes wrong or is missing 8.11 -please express yourself :-) 8.12 -
9.1 --- a/tank/tank Sat Apr 07 13:13:51 2012 +0200 9.2 +++ b/tank/tank Sat Apr 07 22:10:27 2012 +0200 9.3 @@ -92,28 +92,29 @@ 9.4 -config=$vh.slitaz.org -update 2>&1 | tee -a $LOGFILE 9.5 done && echo "" ;; 9.6 adduser) 9.7 - # On Tank /etc/skel is empty to let tank handle default user 9.8 - # files. 9.9 echo "" 9.10 if [ -n "$2" ]; then 9.11 user=$2 9.12 else 9.13 echo -n "User name: " && read user 9.14 fi 9.15 + if [ -n "$3" ]; then 9.16 + gecos="$3" 9.17 + else 9.18 + echo -n "Real name: " && read name 9.19 + fi 9.20 if [ -d /home/$user ]; then 9.21 echo -e "User $user already exists...\n" && exit 1 9.22 fi 9.23 echo "Adding user: $user" 9.24 # adduser -s /bin/sh -g "SliTaz User" -G users -h /home/$user $user # for cooking 9.25 - adduser $user 9.26 + adduser -g "$gecos" $user -G slitaz 9.27 # HG access 9.28 - echo -n "Hg password: " && read passwd 9.29 - echo "$user:$passwd" >> /etc/lighttpd/plain.passwd 9.30 + #echo -n "Hg password: " && read passwd 9.31 + #echo "$user:$passwd" >> /etc/lighttpd/plain.passwd 9.32 # Public dir at http://people.slitaz.org/~$user/ 9.33 - cp -a /usr/share/tank/Public/* /home/$user/Public 9.34 sed -i s/'%user%'/"$user"/ /home/$user/Public/index.html 9.35 - # README and empty Shell profile 9.36 - cp -a /usr/share/tank/README /home/$user/ 9.37 + # Empty Shell profile 9.38 cat > /home/$user/.profile << EOF 9.39 # ~/.profile: Executed by Bourne-compatible login SHells. 9.40 #