]> git.nbdom.net Git - nb.git/commitdiff
remove old comment
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 1 May 2023 19:27:07 +0000 (21:27 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 1 May 2023 19:27:07 +0000 (21:27 +0200)
etc/profile.d/functions

index 92f26e248a057cb59a138859b4e68c9733b0afe4..2268611dc7c57dfc9c04a03956a442f16267df7a 100755 (executable)
@@ -797,19 +797,14 @@ cron_d_install() {
                case "$1" in -t|--test) test=1; shift ;; esac
        fi
 
-       #echo "$#"; return
-# NB 20.03.19  if [ $# -gt 4 -o $# = 0 ]; then
        if [ $# -gt 3 -o $# = 0 ]; then
                echo "$usage" 1>&2 && return 1
-# root 20.03.19                shell_help_noarg "$usage" "--help" && return 1
 
-# NB 20.03.19  #elif [ $# -eq 3 ]; then
        elif [ ! -e "$1" ]; then
                fname=$1; shift
                tmp="/tmp/cron_d_install.$$"
                trap "rm -f $tmp*" RETURN
                file="$tmp.cron"
-# NB 29.03.19 # root 20.03.19     cat <<< "$1" > "$file"; shift
                echo "$1" > "$file"; shift
                exp=$1; shift
 
@@ -839,46 +834,6 @@ cron_d_install() {
        #
        # Case 2 - crontab
        #
-
-#@f = map {chomp; $_} grep {!/^(@|#|\s*$)/} <>;
-# NB 20.03.19  cron=$(perl -e '
-# NB 20.03.19 $diff = 0;
-# NB 20.03.19 $e = shift @ARGV;
-# NB 20.03.19 
-# NB 20.03.19 @f = map {chomp; $_} grep {/^(\w+=|\*|\d+)/} <>;
-# NB 20.03.19 for ($i=0;$i<@f;$i++) {
-# NB 20.03.19  @F = split(" ",$f[$i]);
-# NB 20.03.19 
-# NB 20.03.19  next if $f[$i] !~ /^[\*\d]/ or @F<6;
-# NB 20.03.19  if ($F[5] ne "root"){
-# NB 20.03.19          $_ = join(" ",@F[6..$#F]);
-# NB 20.03.19          s/"/\\"/g;
-# NB 20.03.19          @_=qq|su -l "$F[5]" -c "$_"|;
-# NB 20.03.19          @F = (@F[0..4],"",@_);
-# NB 20.03.19  };
-# NB 20.03.19  $f[$i] = join(" ",@F[0..4,6..$#F]);
-# NB 20.03.19 }
-# NB 20.03.19 0 and warn join("\n",@f);
-# NB 20.03.19 %f = map {$_=>1} @f;
-# NB 20.03.19 
-# NB 20.03.19 @ARGV = ("crontab -l|");
-# NB 20.03.19 @c = map {chomp; $_} <>;
-# NB 20.03.19 %c = map {$_=>1} @c;
-# NB 20.03.19 
-# NB 20.03.19 for (@c) {
-# NB 20.03.19  0 and print STDERR "-$_\n" if $e and !$f{$_} and /$e/;
-# NB 20.03.19  $diff=1 and next if $e and !$f{$_} and /$e/;
-# NB 20.03.19  print "$_\n";
-# NB 20.03.19 }
-# NB 20.03.19 
-# NB 20.03.19 for (@f) {
-# NB 20.03.19  $diff=2 and print "$_\n" if !$c{$_};
-# NB 20.03.19 }
-# NB 20.03.19 
-# NB 20.03.19 exit $diff ? 0 : 1;
-# NB 20.03.19 ' "$exp" "$file"
-# NB 20.03.19 )
-
        cron=$(cron_d2crontab "$exp" "$file")
        if [ "$test" = "1" ]; then
                printf '%s' "cron_d_install: crontab: $fname"