verzia 1.9, 2002/06/16 10:17:25 |
verzia 1.10, 2002/06/21 14:15:15 |
|
|
#!/bin/sh |
#!/bin/sh |
|
|
# |
# |
# sign_gen.sh - powerful signature generator |
# sign - powerful signature handling |
# |
# |
# (c) 2001-2002 Ondrej Jombik <nepto@pobox.sk> |
# sign-gen.sh - powerful signature generator |
# - based on the characters created by Rider <rider@lonestar.sk> |
# (based on the characters created by Rider <rider@lonestar.sk>) |
|
# ____________________________________________________________ |
# |
# |
|
# Developed by Ondrej Jombik <nepto@pobox.sk> |
|
# Copyright (c) 2001-2002 Platon SDG, http://www.platon.sk/ |
|
# All rights reserved. |
|
# |
|
# See README file for more information about this software. |
|
# See COPYING file for license information. |
|
# |
|
# Download the latest version from |
|
# http://www.platon.sk/projects/sign/ |
|
# |
|
|
# $Id$ |
# $Id$ |
# |
# |
# Updates: [14/4/2001] [3/10/2001] [7/11/2001] |
# Updates: 14/4/2001, 3/10/2001, 7/11/2001 |
# 12/4/2002 - execution code signature support |
# 12/4/2002 - execution code signature support |
# - multi user support via hashfile |
# - multi user support via hashfile |
# |
# 21/6/2002 - header & copyright update |
|
# - 'cat' command optimalizations |
|
|
|
############################################################################# |
|
|
# |
# |
# Directory of sign scripts (this one and cooperates scripts) |
# Directory of sign scripts (this one and cooperates scripts) |
Riadok 150 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
Riadok 165 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
# Fast check if signature file is still present; if not exit immidiately |
# Fast check if signature file is still present; if not exit immidiately |
# |
# |
if [ ! -f "$SIGN_DB_FILE" ]; then |
if [ ! -f "$SIGN_DB_FILE" ]; then |
exit; |
exit 1; |
fi |
fi |
|
|
# |
# |
# Preparing some variabiles for date file |
# Preparing some variabiles for date file |
# |
# |
case `date +%m` in |
case `date +%m` in |
01) month="januar";; |
01) month='januar';; |
02) month="februar";; |
02) month='februar';; |
03) month="marec";; |
03) month='marec';; |
04) month="april";; |
04) month='april';; |
05) month="maj";; |
05) month='maj';; |
06) month="jun";; |
06) month='jun';; |
07) month="jul";; |
07) month='jul';; |
08) month="august";; |
08) month='august';; |
09) month="september";; |
09) month='september';; |
10) month="oktober";; |
10) month='oktober';; |
11) month="november";; |
11) month='november';; |
12) month="december";; |
12) month='december';; |
esac |
esac |
|
|
case `date +%w` in |
case `date +%w` in |
1) day="pondelok";; |
1) day='pondelok';; |
2) day="utorok";; |
2) day='utorok';; |
3) day="streda";; |
3) day='streda';; |
4) day="stvrtok";; |
4) day='stvrtok';; |
5) day="piatok";; |
5) day='piatok';; |
6) day="sobota";; |
6) day='sobota';; |
0) day="nedela";; |
0) day='nedela';; |
esac |
esac |
|
|
# |
# |
Riadok 203 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
Riadok 218 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
# - the whole database file on stdout |
# - the whole database file on stdout |
# |
# |
# echo -e "----\nid - $sign_id\ncount - $sign_count" >> ~/.tmp.s; |
# echo -e "----\nid - $sign_id\ncount - $sign_count" >> ~/.tmp.s; |
cat $SIGN_DB_FILE | perl -e " \ |
perl -e " \ |
my \$count; \$count = 0; \ |
my \$count; \$count = 0; \ |
my \$ok; \$ok = 1; \ |
my \$ok; \$ok = 1; \ |
while(<>) { \ |
while(<>) { \ |
Riadok 214 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
Riadok 229 while [ `ps x | sed 's/^ *//' | cut -f1 |
|
print stderr if (\$count == $sign_id); \ |
print stderr if (\$count == $sign_id); \ |
print stdout; \ |
print stdout; \ |
} \ |
} \ |
}" 2> ~/.tmp.s > ~/.tmp.s.db; |
}" 2> ~/.tmp.s > ~/.tmp.s.db < $SIGN_DB_FILE; |
|
|
# |
|
# Compose whole database file (without separating tags) |
|
# TODO: only valid signatures should be witten into file |
|
# |
|
#cat $SIGN_DB_FILE \ |
|
# | egrep -v "^($SIGN_DB_SEPARATOR|$SIGN_DB_SEPARATOR_NOTUSED)$" \ |
|
# > ~/.tmp.s.db |
|
|
|
# |
# |
# Compose whole signature |
# Compose whole signature |