slitaz-base-files rev 147

Add SLITAZ_ARCH and PKGS_DB in slitaz.conf and add /usr/bin/slitaz
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 11 14:13:37 2012 +0200 (2012-05-11)
parents b7930b8e90d6
children 8ca19a8867e6
files rootfs/etc/slitaz/slitaz.conf rootfs/usr/bin/slitaz
line diff
     1.1 --- a/rootfs/etc/slitaz/slitaz.conf	Sun May 06 02:02:29 2012 +0200
     1.2 +++ b/rootfs/etc/slitaz/slitaz.conf	Fri May 11 14:13:37 2012 +0200
     1.3 @@ -3,8 +3,9 @@
     1.4  
     1.5  # Slitaz release.
     1.6  SLITAZ_RELEASE="$(cat /etc/slitaz-release)"
     1.7 -# OLD compatibility --> remove when other tools use SLITAZ_RELEASE
     1.8 -SLITAZ_VERSION="$SLITAZ_RELEASE"
     1.9 +
    1.10 +# Slitaz architecture.
    1.11 +SLITAZ_ARCH="i486"
    1.12  
    1.13  # Slitaz directory.
    1.14  SLITAZ_HOME="/home/slitaz"
    1.15 @@ -30,13 +31,10 @@
    1.16  
    1.17  # Online and local packages repository.
    1.18  ONLINE_PKGS="$MIRROR_URL/packages/$SLITAZ_RELEASE/"
    1.19 -LOCAL_PKGS="$SLITAZ_HOME/packages/$SLITAZ_RELEASE/"
    1.20 +LOCAL_PKGS="$SLITAZ_HOME/$SLITAZ_RELEASE/packages/"
    1.21  
    1.22 -# Path to Tazpkg data.
    1.23 -LOCALSTATE="/var/lib/tazpkg"
    1.24 -
    1.25 -# Path to installed packages data.
    1.26 -INSTALLED="$LOCALSTATE/installed"
    1.27 +# Path to Tazpkg data base.
    1.28 +PKGS_DB="/var/lib/tazpkg"
    1.29  
    1.30  # Packages categories.
    1.31  PKGS_CATEGORIES="
    1.32 @@ -55,5 +53,12 @@
    1.33  meta
    1.34  non-free"
    1.35  
    1.36 -# OLD compatibility --> Can be removed when tazpkg.conf have CACHE_DIR
    1.37 +#
    1.38 +# OLD variables for compatibility purpose.
    1.39 +#
    1.40 +
    1.41 +SLITAZ_VERSION="$SLITAZ_RELEASE"
    1.42  CACHE_DIR="/var/cache/tazpkg"
    1.43 +LOCALSTATE="$PKGS_DB"
    1.44 +INSTALLED="$PKGS_DB/installed"
    1.45 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/rootfs/usr/bin/slitaz	Fri May 11 14:13:37 2012 +0200
     2.3 @@ -0,0 +1,35 @@
     2.4 +#!/bin/sh
     2.5 +#
     2.6 +# SliTaz - Configs, release info, default paths, arch, kernel version, ...
     2.7 +#
     2.8 +. /lib/libtaz.sh
     2.9 +. /etc/slitaz/slitaz.conf
    2.10 +
    2.11 +# /etc/slitaz/slitaz.conf
    2.12 +: ${SLITAZ_ARCH=i486}
    2.13 +: ${PKGS_DB=/var/lib/tazpkg}
    2.14 +
    2.15 +case "$1" in
    2.16 +	""|--output=*)
    2.17 +		echo ""
    2.18 +		boldify "SliTaz GNU/Linux"
    2.19 +		separator
    2.20 +		cat << EOT
    2.21 +Release      : $SLITAZ_RELEASE
    2.22 +Architecture : $SLITAZ_ARCH
    2.23 +Kernel       : $(uname -r)
    2.24 +Boot options : $(cat /proc/cmdline)
    2.25 +Home path    : $SLITAZ_HOME
    2.26 +Configs      : $SLITAZ_CONFIGS
    2.27 +Log files    : $SLITAZ_LOGS
    2.28 +Packages DB  : $PKGS_DB
    2.29 +Installed    : $(ls $PKGS_DB/installed | wc -l) packages
    2.30 +Mirror       : $(cat $PKGS_DB/mirror)
    2.31 +EOT
    2.32 +		separator
    2.33 +		echo -e "Config file: /etc/slitaz/slitaz.conf\n" ;;
    2.34 +	*)
    2.35 +		echo "Usage: $(basename $0)" ;;
    2.36 +esac
    2.37 +
    2.38 +exit 0