# HG changeset patch # User Christophe Lincoln # Date 1333829427 -7200 # Node ID 756484360720994007664684c4273a3e4423339a # Parent a870612e2065b5c6b56d4b449ac83be70c0e16cd tank: use real name in gecos filed and put files in /etc/skel diff -r a870612e2065 -r 756484360720 pkgs/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pkgs/README Sat Apr 07 22:10:27 2012 +0200 @@ -0,0 +1,18 @@ +SliTaz Packages web interface +================================================================================ + + +This is TazPKG web interface with a search engine for packages, files, +dependencies and more. + + +TODO +---- + + * Use GET so we can copy past urls from a browser + * Gettextise the search engine and use PO files + * Add package page with all info and an install link + (tazpkg:// or tazpkg: works in Midori + + +================================================================================ diff -r a870612e2065 -r 756484360720 pkgs/search.sh --- a/pkgs/search.sh Sat Apr 07 13:13:51 2012 +0200 +++ b/pkgs/search.sh Sat Apr 07 22:10:27 2012 +0200 @@ -15,6 +15,7 @@ OBJECT=$object DATE=$(date +%Y-%m-%d\ %H:%M:%S) VERSION=cooking + if [ "$REQUEST_METHOD" = "GET" ]; then SEARCH="" VERBOSE=0 diff -r a870612e2065 -r 756484360720 tank/files/etc/skel/Public/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tank/files/etc/skel/Public/index.html Sat Apr 07 22:10:27 2012 +0200 @@ -0,0 +1,36 @@ + + + + %user% - SliTaz + + + + + + + + +
+ + + +My SliTaz stuff + +
+ + + + + diff -r a870612e2065 -r 756484360720 tank/files/etc/skel/Public/profile.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tank/files/etc/skel/Public/profile.php Sat Apr 07 22:10:27 2012 +0200 @@ -0,0 +1,13 @@ + diff -r a870612e2065 -r 756484360720 tank/files/etc/skel/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tank/files/etc/skel/README Sat Apr 07 22:10:27 2012 +0200 @@ -0,0 +1,9 @@ +Welcome to Tank! +================================================================================ + +Your Public directory URL is: http://people.slitaz.org/~$USER/ + +Please complete your public profile in ~/Public/profile.php and feel free +to use the service for your needs, if anything goes wrong or is missing +please express yourself :-) + diff -r a870612e2065 -r 756484360720 tank/files/usr/share/tank/Public/index.html --- a/tank/files/usr/share/tank/Public/index.html Sat Apr 07 13:13:51 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ - - - - %user% - SliTaz - - - - - - - - -
- - - -My SliTaz stuff - -
- - - - - diff -r a870612e2065 -r 756484360720 tank/files/usr/share/tank/Public/profile.php --- a/tank/files/usr/share/tank/Public/profile.php Sat Apr 07 13:13:51 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - diff -r a870612e2065 -r 756484360720 tank/files/usr/share/tank/README --- a/tank/files/usr/share/tank/README Sat Apr 07 13:13:51 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -Welcome to Tank! -================================================================================ - -Your Public directory URL is: http://people.slitaz.org/~$USER/ - -Please complete your public profile in ~/Public/profile.php and feel free -to use the service for your needs, if anything goes wrong or is missing -please express yourself :-) - diff -r a870612e2065 -r 756484360720 tank/tank --- a/tank/tank Sat Apr 07 13:13:51 2012 +0200 +++ b/tank/tank Sat Apr 07 22:10:27 2012 +0200 @@ -92,28 +92,29 @@ -config=$vh.slitaz.org -update 2>&1 | tee -a $LOGFILE done && echo "" ;; adduser) - # On Tank /etc/skel is empty to let tank handle default user - # files. echo "" if [ -n "$2" ]; then user=$2 else echo -n "User name: " && read user fi + if [ -n "$3" ]; then + gecos="$3" + else + echo -n "Real name: " && read name + fi if [ -d /home/$user ]; then echo -e "User $user already exists...\n" && exit 1 fi echo "Adding user: $user" # adduser -s /bin/sh -g "SliTaz User" -G users -h /home/$user $user # for cooking - adduser $user + adduser -g "$gecos" $user -G slitaz # HG access - echo -n "Hg password: " && read passwd - echo "$user:$passwd" >> /etc/lighttpd/plain.passwd + #echo -n "Hg password: " && read passwd + #echo "$user:$passwd" >> /etc/lighttpd/plain.passwd # Public dir at http://people.slitaz.org/~$user/ - cp -a /usr/share/tank/Public/* /home/$user/Public sed -i s/'%user%'/"$user"/ /home/$user/Public/index.html - # README and empty Shell profile - cp -a /usr/share/tank/README /home/$user/ + # Empty Shell profile cat > /home/$user/.profile << EOF # ~/.profile: Executed by Bourne-compatible login SHells. #