summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2023-05-05 15:34:17 -0500
committerGitHub <noreply@github.com>2023-05-05 15:34:17 -0500
commit634913a9c365e73aa67e1478bc01d85fc52d54d6 (patch)
treedbba7ffc4b47b3a5528388b5e6a267e03017dd84 /scripts
parent87742e42c71da5a48633fb22df831aa2b7403bd8 (diff)
parentdd34652631caa140b9d5edbe2336643ebe14666d (diff)
downloadvyatta-op-634913a9c365e73aa67e1478bc01d85fc52d54d6.tar.gz
vyatta-op-634913a9c365e73aa67e1478bc01d85fc52d54d6.zip
Merge pull request #62 from dmbaturin/T671-dead-scripts
T671: remove unused scripts
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-gettime.pl44
-rw-r--r--scripts/vyatta-monitor-list21
-rw-r--r--scripts/vyatta-regen-unpriv-commands.sh3
-rwxr-xr-xscripts/vyatta-show-current-user20
4 files changed, 0 insertions, 88 deletions
diff --git a/scripts/vyatta-gettime.pl b/scripts/vyatta-gettime.pl
deleted file mode 100755
index ae0824b..0000000
--- a/scripts/vyatta-gettime.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/perl
-#
-# Module: vyatta-gettime.pl
-#
-# **** License ****
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# This code was originally developed by Vyatta, Inc.
-# Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc.
-# All Rights Reserved.
-#
-# Author: Stephen Hemminger
-# Date: March 2009
-# Description: Script to read time for shutdown
-#
-# **** End License ****
-#
-
-use strict;
-use warnings;
-use Date::Format;
-
-sub gettime {
- my $t = shift;
-
- return time2str( "%R", time ) if ( $t eq 'now' );
- return $t if ( $t =~ /^[0-9]+:[0-9]+/ );
- $t = substr( $t, 1 ) if ( $t =~ /^\+/ );
- return time2str( "%R", time + ( $_ * 60 ) ) if ( $t =~ /^[0-9]+/ );
-
- die "invalid time format: $t\n";
-}
-
-# decode shutdown time
-for (@ARGV) {
- print gettime($_), "\n";
-}
diff --git a/scripts/vyatta-monitor-list b/scripts/vyatta-monitor-list
deleted file mode 100644
index 6862f03..0000000
--- a/scripts/vyatta-monitor-list
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-declare CURRENT_PTS=$(tty | sed -e s-/--g -e s/dev//g)
-declare CURRENT_UID=$(id -u)
-declare -a MPIDS
-MPIDS=( $(ls /var/run/vyatta/monitor/*.pid 2>/dev/null) )
-
-for pidfile in "${MPIDS[@]}"; do
- pid=$(<$pidfile)
- procname=$(cat /proc/$pid/cmdline 2>/dev/null)
- if [[ "$procname" =~ "tail" ]] ; then
- pts=${pidfile##*-pts}
- pts=${pts%%.pid}
- if [[ "pts$pts" == "$CURRENT_PTS" ]]; then
- if cat /proc/$pid/status | grep -q "Uid:.*$CURRENT_UID" ; then
- print=${pidfile##*/}
- print=${print%%-pts$pts*}
- echo $print
- fi
- fi
- fi
-done
diff --git a/scripts/vyatta-regen-unpriv-commands.sh b/scripts/vyatta-regen-unpriv-commands.sh
deleted file mode 100644
index e6f7e2f..0000000
--- a/scripts/vyatta-regen-unpriv-commands.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-source /opt/vyatta/share/vyatta-op/functions/interpreter/vyatta-unpriv
-vyatta_unpriv_gen_allowed
diff --git a/scripts/vyatta-show-current-user b/scripts/vyatta-show-current-user
deleted file mode 100755
index f55f047..0000000
--- a/scripts/vyatta-show-current-user
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/bash
-#
-# Simple script for "show login"
-
-echo -n "login : " ; who -m
-
-if [ -n "$VYATTA_USER_LEVEL_DIR" ]
-then
- echo -n "level : "
- basename $VYATTA_USER_LEVEL_DIR
-fi
-
-echo -n "user : " ; id -un
-echo -n "groups : " ; id -Gn
-
-if id -Z >/dev/null 2>&1
-then
- echo -n "context : "
- id -Z
-fi