diff options
author | Bryan Bishop <kanzure@gmail.com> | 2010-10-29 19:46:24 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2010-10-29 19:46:24 -0500 |
commit | 7786ce2a332b0eba4b3ca7c57f906a32e8715da3 (patch) | |
tree | 5a9fe32b69a93f41ae2ac82a50788fe50c0d86fb /usr/src/pinyadmin | |
parent | 413373be9ab30eb21b564cdc180cb2dcda77bfeb (diff) | |
download | piny-code-7786ce2a332b0eba4b3ca7c57f906a32e8715da3.tar.gz piny-code-7786ce2a332b0eba4b3ca7c57f906a32e8715da3.zip |
Starting repo cleanup to make this not so awful
Diffstat (limited to 'usr/src/pinyadmin')
36 files changed, 0 insertions, 570 deletions
diff --git a/usr/src/pinyadmin/Makefile b/usr/src/pinyadmin/Makefile deleted file mode 100644 index 64ac713..0000000 --- a/usr/src/pinyadmin/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -build: - mkdir -p man - for f in doc/*.latex; do latex2man $$f man/$$(basename $$f .latex).man; done - ln -s newuser.man man/createuser.man - -install: - install -o root -g root -m 755 -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/sbin - install -o root -g root -m 755 bin/* $(DESTDIR)/usr/bin - install -o root -g root -m 755 sbin/* $(DESTDIR)/usr/sbin - -clean: - rm -rf man diff --git a/usr/src/pinyadmin/bin/addaccess b/usr/src/pinyadmin/bin/addaccess deleted file mode 100755 index 849119d..0000000 --- a/usr/src/pinyadmin/bin/addaccess +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /usr/bin/sudo /usr/sbin/addaccess "$@" diff --git a/usr/src/pinyadmin/bin/appendkeys b/usr/src/pinyadmin/bin/appendkeys deleted file mode 100755 index a4b7d98..0000000 --- a/usr/src/pinyadmin/bin/appendkeys +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -/bin/mkdir -p ~/.ssh -/bin/echo Please input authorized keys to be appended. ctrl-d to finish, ctrl-c to abort current line. -/bin/cat >> ~/.ssh/authorized_keys diff --git a/usr/src/pinyadmin/bin/createuser b/usr/src/pinyadmin/bin/createuser deleted file mode 120000 index e9d7937..0000000 --- a/usr/src/pinyadmin/bin/createuser +++ /dev/null @@ -1 +0,0 @@ -newuser
\ No newline at end of file diff --git a/usr/src/pinyadmin/bin/lsaccess b/usr/src/pinyadmin/bin/lsaccess deleted file mode 100755 index ce41fc4..0000000 --- a/usr/src/pinyadmin/bin/lsaccess +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Piny; - -my $env = Piny::Environment->instance( ); - -my ( $reponame ) = @ARGV; - -if ( defined $reponame ) { - - my $repo = Piny::Repo->new( $reponame ); - - foreach my $user ( Piny::User->all_users( ) ) { - if ( $repo->has_access( $user ) ) { - print $user->name . "\n"; - }; - }; - -} else { - - foreach my $repo ( Piny::Repo->all_repos( ) ) { - if ( $repo->has_access( $env->user ) ) { - print $repo->name . "\n"; - }; - }; - -}; diff --git a/usr/src/pinyadmin/bin/lsrepo b/usr/src/pinyadmin/bin/lsrepo deleted file mode 100755 index 2d88eb5..0000000 --- a/usr/src/pinyadmin/bin/lsrepo +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Piny; - -foreach my $repo ( Piny::Repo->all_repos( ) ) { - print $repo->name . "\n"; -}; diff --git a/usr/src/pinyadmin/bin/newrepo b/usr/src/pinyadmin/bin/newrepo deleted file mode 100755 index 025e0cf..0000000 --- a/usr/src/pinyadmin/bin/newrepo +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /usr/bin/sudo /usr/sbin/newrepo "$@" diff --git a/usr/src/pinyadmin/bin/newuser b/usr/src/pinyadmin/bin/newuser deleted file mode 100755 index 1f73ed6..0000000 --- a/usr/src/pinyadmin/bin/newuser +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /usr/bin/sudo /usr/sbin/newuser diff --git a/usr/src/pinyadmin/bin/pinyconfig b/usr/src/pinyadmin/bin/pinyconfig deleted file mode 100755 index 4e54f76..0000000 --- a/usr/src/pinyadmin/bin/pinyconfig +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /usr/bin/sudo /usr/sbin/pinyconfig "$@" diff --git a/usr/src/pinyadmin/bin/pinyshell b/usr/src/pinyadmin/bin/pinyshell deleted file mode 100755 index 0db88a8..0000000 --- a/usr/src/pinyadmin/bin/pinyshell +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -cd /srv/rbin -export PATH=/srv/rbin - -exec /bin/rbash "$@" diff --git a/usr/src/pinyadmin/bin/readkeys b/usr/src/pinyadmin/bin/readkeys deleted file mode 100755 index 745bd8d..0000000 --- a/usr/src/pinyadmin/bin/readkeys +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/bin/cat ~/.ssh/authorized_keys diff --git a/usr/src/pinyadmin/bin/rmaccess b/usr/src/pinyadmin/bin/rmaccess deleted file mode 100755 index 665052c..0000000 --- a/usr/src/pinyadmin/bin/rmaccess +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /usr/bin/sudo /usr/sbin/rmaccess "$@" diff --git a/usr/src/pinyadmin/bin/rmrepo b/usr/src/pinyadmin/bin/rmrepo deleted file mode 100755 index e0e8085..0000000 --- a/usr/src/pinyadmin/bin/rmrepo +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec /usr/bin/sudo /usr/sbin/rmrepo "$@" diff --git a/usr/src/pinyadmin/bin/writekeys b/usr/src/pinyadmin/bin/writekeys deleted file mode 100755 index 61a7760..0000000 --- a/usr/src/pinyadmin/bin/writekeys +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -/bin/mkdir -p ~/.ssh -/bin/echo Please input all authorized keys. ctrl-d to finish, ctrl-c to abort. -/usr/bin/sponge ~/.ssh/authorized_keys diff --git a/usr/src/pinyadmin/debian/changelog b/usr/src/pinyadmin/debian/changelog deleted file mode 100644 index e11d900..0000000 --- a/usr/src/pinyadmin/debian/changelog +++ /dev/null @@ -1,48 +0,0 @@ -pinyadmin (0.8) unstable; urgency=low - - * New config tweakable stuff. - - -- Julian Blake Kongslie <jblake@omgwallhack.org> Mon, 11 Oct 2010 21:56:04 -0700 - -pinyadmin (0.7) unstable; urgency=low - - * Creating ssh key management utilities. - - -- Joe Rayhawk <jrayhawk@omgwallhack.org> Fri, 03 Sep 2010 01:40:01 -0700 - -pinyadmin (0.6) unstable; urgency=low - - * Revised newrepo to use libpiny. - - -- Julian Blake Kongslie <jblake@omgwallhack.org> Wed, 07 Jul 2010 15:44:31 -0700 - -pinyadmin (0.5) unstable; urgency=low - - * Listing repos and repo access rights. - - -- Julian Blake Kongslie <jblake@omgwallhack.org> Tue, 29 Jun 2010 22:32:30 -0700 - -pinyadmin (0.4) unstable; urgency=low - - * Minor typo in manpage. - - -- Julian Blake Kongslie <jblake@omgwallhack.org> Sun, 18 Apr 2010 13:51:13 -0700 - -pinyadmin (0.3) unstable; urgency=low - - * A few more manpages. - - -- Julian Blake Kongslie <jblake@omgwallhack.org> Sun, 18 Apr 2010 13:19:34 -0700 - -pinyadmin (0.2) unstable; urgency=low - - * Switch to native packaging. - * Add manpages. - - -- Julian Blake Kongslie <jblake@omgwallhack.org> Sun, 18 Apr 2010 13:01:32 -0700 - -pinyadmin (0.1-1) unstable; urgency=low - - * Initial release. - - -- Julian Blake Kongslie <jblake@omgwallhack.org> Thu, 18 Mar 2010 13:55:40 -0700 diff --git a/usr/src/pinyadmin/debian/compat b/usr/src/pinyadmin/debian/compat deleted file mode 100644 index 7f8f011..0000000 --- a/usr/src/pinyadmin/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/usr/src/pinyadmin/debian/control b/usr/src/pinyadmin/debian/control deleted file mode 100644 index e8c2d70..0000000 --- a/usr/src/pinyadmin/debian/control +++ /dev/null @@ -1,13 +0,0 @@ -Source: pinyadmin -Maintainer: Julian Blake Kongslie <jblake@omgwallhack.org> -Section: admin -Build-depends: debhelper (>= 7), texlive-extra-utils -Priority: extra -Standards-version: 3.8.4 - -Package: pinyadmin -Architecture: all -Depends: ${perl:Depends}, ${misc:Depends}, libpiny-perl (>= 0.14), moreutils -Description: Administrative programs for piny - The command-line programs for day-to-day administrative tasks in the Piny - infrastructure. diff --git a/usr/src/pinyadmin/debian/copyright b/usr/src/pinyadmin/debian/copyright deleted file mode 100644 index 9d12aab..0000000 --- a/usr/src/pinyadmin/debian/copyright +++ /dev/null @@ -1,3 +0,0 @@ -Copyright © 2010 Joe Rayhawk <jrayhawk@omgwallhack.org> -Copyright © 2010 Julian Blake Kongslie <jblake@omgwallhack.org> -Licensed under the BSD 3-clause license. diff --git a/usr/src/pinyadmin/debian/pinyadmin.manpages b/usr/src/pinyadmin/debian/pinyadmin.manpages deleted file mode 100644 index 85c5e00..0000000 --- a/usr/src/pinyadmin/debian/pinyadmin.manpages +++ /dev/null @@ -1 +0,0 @@ -man/* diff --git a/usr/src/pinyadmin/debian/rules b/usr/src/pinyadmin/debian/rules deleted file mode 100755 index 2d33f6a..0000000 --- a/usr/src/pinyadmin/debian/rules +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/make -f - -%: - dh $@ diff --git a/usr/src/pinyadmin/debian/source/format b/usr/src/pinyadmin/debian/source/format deleted file mode 100644 index 89ae9db..0000000 --- a/usr/src/pinyadmin/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/usr/src/pinyadmin/doc/addaccess.latex b/usr/src/pinyadmin/doc/addaccess.latex deleted file mode 100644 index a8c29f9..0000000 --- a/usr/src/pinyadmin/doc/addaccess.latex +++ /dev/null @@ -1,17 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{1piny}{addaccess}{Piny Team}{Piny}{addaccess} - -\Prog{addaccess} - allow access to a repository - -\section{Synopsis} - -\Prog{addaccess} \Arg{reponame} \Arg{username} \Dots - -\section{Description} - -The \Prog{addaccess} command grants users write access to a repository. -It may only be run by the owner of the repository. - -For each \Arg{username} passed on the command line, \Prog{addaccess} will grant write permission to the repository. -Other users are not affected. diff --git a/usr/src/pinyadmin/doc/newrepo.latex b/usr/src/pinyadmin/doc/newrepo.latex deleted file mode 100644 index a708b6c..0000000 --- a/usr/src/pinyadmin/doc/newrepo.latex +++ /dev/null @@ -1,15 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{1piny}{newrepo}{Piny Team}{Piny}{newrepo} - -\Prog{newrepo} - create a new repository - -\section{Synopsis} - -\Prog{newrepo} \Arg{reponame} - -\section{Description} - -The \Prog{newrepo} command creates a new repository with the given name. -The current user is set as the owner of the new repository. -No other users are given access to the new repository. diff --git a/usr/src/pinyadmin/doc/newuser.latex b/usr/src/pinyadmin/doc/newuser.latex deleted file mode 100644 index 721d468..0000000 --- a/usr/src/pinyadmin/doc/newuser.latex +++ /dev/null @@ -1,16 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{8piny}{newuser}{Piny Team}{Piny}{createuser} - -\Prog{newuser} - add a piny user - -\section{Synopsis} - -\Prog{newuser} - -\Prog{createuser} - -\section{Description} - -The \Prog{newuser} program is an interactive script which walks the user through the process of creating a new Piny account. -Normally it is set as the shell of a passwordless user such as "newuser" or "createuser", so that users can create accounts without any assistance from a sysadmin. diff --git a/usr/src/pinyadmin/doc/pinyconfig.latex b/usr/src/pinyadmin/doc/pinyconfig.latex deleted file mode 100644 index 4908dbb..0000000 --- a/usr/src/pinyadmin/doc/pinyconfig.latex +++ /dev/null @@ -1,17 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{1piny}{pinyconfig}{Piny Team}{Piny}{pinyconfig} - -\Prog{pinyconfig} - change tweakables on a repo - -\section{Synopsis} - -\Prog{pinyconfig} \Arg{reponame} \Arg{tweakable} \oArg{value} - -\section{Description} - -The \Prog{pinyconfig} command reads and writes tweakables for a repo. - -When run, it prints the value of the tweakable for the repo named. -If a value was passed, it sets the value of the tweakable to that value -before printing it. diff --git a/usr/src/pinyadmin/doc/pinyshell.latex b/usr/src/pinyadmin/doc/pinyshell.latex deleted file mode 100644 index 481ddf3..0000000 --- a/usr/src/pinyadmin/doc/pinyshell.latex +++ /dev/null @@ -1,19 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{8piny}{pinyshell}{Piny Team}{Piny}{pinyshell} - -\Prog{pinyshell} - a restricted shell - -\section{Synopsis} - -\Prog{pinyshell} - -\section{Description} - -\Prog{pinyshell} is just another way to invoke \Cmd{1}{rbash}; the separate name is used for accounting purposes within the piny infrastructure. - -Users which should be managed by the Piny infrastructure should have \Prog{pinyshell} as their shell. - -\section{See Also} - -\Cmd{1}{rbash} diff --git a/usr/src/pinyadmin/doc/rebuildrepo.latex b/usr/src/pinyadmin/doc/rebuildrepo.latex deleted file mode 100644 index a2e0935..0000000 --- a/usr/src/pinyadmin/doc/rebuildrepo.latex +++ /dev/null @@ -1,16 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{8piny}{rebuildrepo}{Piny Team}{Piny}{rebuildrepo} - -\Prog{rebuildrepo} - rebuild a repo configuration - -\section{Synopsis} - -\Prog{rebuildrepo} \Arg{reponame} \Dots - -\section{Description} - -The \Prog{rebuildrepo} command rewrites all of the configuration files for -the given repo and adjusts ownership and group membership of its files to a -normalized state. It is needed to propagate certain kinds of changes; -normally only the system administrator should run it. diff --git a/usr/src/pinyadmin/doc/rmaccess.latex b/usr/src/pinyadmin/doc/rmaccess.latex deleted file mode 100644 index 41f7af4..0000000 --- a/usr/src/pinyadmin/doc/rmaccess.latex +++ /dev/null @@ -1,22 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{1piny}{rmaccess}{Piny Team}{Piny}{rmaccess} - -\Prog{rmaccess} - remove access to a repository - -\section{Synopsis} - -\Prog{rmaccess} \Arg{reponame} \Arg{username} \Dots - -\section{Description} - -The \Prog{rmaccess} command denies users write access to a repository. -It may only be run by the owner of the repository. - -For each \Arg{username} passed on the command line, \Prog{addaccess} will deny write permission to the repository. -Other users are not affected. - -\section{Bugs} - -You cannot deny write permission to the owner of the repository. -If you try, the program will appear to succeed, but the owner will still be able to make changes. diff --git a/usr/src/pinyadmin/doc/rmrepo.latex b/usr/src/pinyadmin/doc/rmrepo.latex deleted file mode 100644 index 12b58df..0000000 --- a/usr/src/pinyadmin/doc/rmrepo.latex +++ /dev/null @@ -1,14 +0,0 @@ -\usepackage{latex2man} - -\begin{Name}{1piny}{rmrepo}{Piny Team}{Piny}{rmrepo} - -\Prog{rmrepo} - delete a repository - -\section{Synopsis} - -\Prog{rmrepo} \Arg{reponame} \Dots - -\section{Description} - -The \Prog{rmrepo} command permanently destroys the repository with the given name. -The current user must be the owner of the repository. diff --git a/usr/src/pinyadmin/sbin/addaccess b/usr/src/pinyadmin/sbin/addaccess deleted file mode 100755 index e351114..0000000 --- a/usr/src/pinyadmin/sbin/addaccess +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Piny; - -my $env = Piny::Environment->instance( ); - -my ( $reponame, @users ) = @ARGV; - -my $repo = Piny::Repo->new( $reponame ); - -if ( $repo->owner->uid != $env->user->uid ) { - print "You are not the owner of that repo!\n"; - exit( 3 ); -}; - -$repo->add_access( map { Piny::User->new( $_ ) } @users ); diff --git a/usr/src/pinyadmin/sbin/newrepo b/usr/src/pinyadmin/sbin/newrepo deleted file mode 100755 index a178ecb..0000000 --- a/usr/src/pinyadmin/sbin/newrepo +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Moose::Util::TypeConstraints qw( find_type_constraint ); - -use Piny; - -my ( $name ) = @ARGV; - -if ( not defined $name ) { - print "Usage: newrepo REPONAME\n"; - exit 1; -}; - -if ( not find_type_constraint( "Reponame" )->check( $name ) ) { - print "That is not a valid repo name; must be at least 1 character long, begin with a lowercase alphanumeric character, and contain only alphanumeric characters and dashes.\n"; - exit 1; -}; - -my $description; -while( 1 ) { - - print "Provide a one-line description to be used in repo listings, the shorter the better:\n"; - chomp( $description = <STDIN> ); - - if ( not find_type_constraint( "SimpleText" )->check( $description ) ) { - print "Must be 1-80 characters long; control characters (including tab) not allowed.\n"; - next; - }; - - print "Okay! Working, please wait...\n"; - last; - -}; - -my $repo = Piny::Repo->create( $name, $description ); - -print "Repo URL: " . $repo->ikiwiki_url . "\n"; diff --git a/usr/src/pinyadmin/sbin/newuser b/usr/src/pinyadmin/sbin/newuser deleted file mode 100755 index e064f06..0000000 --- a/usr/src/pinyadmin/sbin/newuser +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Email::Valid::Loose qw( ); - -# If they passed any arguments, complain and exit. -if ( scalar @ARGV ) { - print "You can't pass any arguments to this script!\n"; - exit 2; -}; - -# If they didn't provide a terminal definition, then assume xterm. -# Everybody emulates xterm to at least a basic extent. -if ( not exists $ENV{"TERM"} ) { - $ENV{"TERM"} = "xterm"; - print "I don't know what terminal you're using; guessing xterm...\n"; -}; - -# Disable buffering. -$|++; - -# Configure the strictness of our email checks. -my $checker = Email::Valid::Loose->new - ( "-fqdn" => 1 - , "-fudge" => 0 - , "-local_rules" => 0 - , "-mxcheck" => 1 - , "-tldcheck" => 0 - ); - -my ( $email, $username, $password1, $password2 ); - -while ( 1 ) { - - print "Email address to associate with new user: "; - chomp ( $email = <STDIN> ); - - if ( $email eq "" ) { - print "You must provide an email address!\n"; - next; - }; - - $email = $checker->address( $email ); - if ( not defined $email ) { - print "Please, at least pretend to provide a valid email address.\n"; - next; - }; - - last; - -}; - -while ( 1 ) { - - print "Desired username: "; - chomp ( $username = <STDIN> ); - - if ( $username eq "" ) { - print "You have to enter a username!\n"; - next; - }; - - if ( $username =~ /^git-|^ikiwiki-/ ) { - print "Your username cannot start with git- or ikiwiki-!\n"; - next - }; - - if ( $username !~ /^[a-zA-Z0-9_.][a-zA-Z0-9_.-]+$/ ) { - print( "Usernames must consist only of letters, digits, underscores, periods, and dashes, and not start with a dash. Usernames are case sensitive.\n" ); - next - }; - - last; - -}; - -while ( 1 ) { - - system( "stty", "-echo" ); - print "Desired password: "; - chomp ( $password1 = <STDIN> ); - print "\nRetype password: "; - chomp ( $password2 = <STDIN> ); - print "\n"; - system( "stty", "echo" ); - - if ( $password1 ne $password2 ) { - print "Provided passwords do not match; try again.\n"; - next; - }; - - if ( $password1 eq "" ) { - print "You have to enter a password!\n"; - next; - }; - - last; - -}; - -my @saltchars = - ( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' - , 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' - , '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' - , '.', '/' - ); - -my $salt = "\$6\$"; - -foreach my $n ( 1 .. 16 ) { - $salt .= $saltchars[int ( rand ( scalar @saltchars ) )]; -}; - -$salt .= "\$"; - -my $crypt = crypt( $password1, $salt ); - -my $ret = system( "/usr/sbin/useradd", "-c", "$email", "-k", "/var/empty", "-g", "users", "-m", "-p", $crypt, "-s", "/usr/bin/pinyshell", $username ); - -if ( $ret ) { - print "An error occured creating the user; most likely, that username is already taken.\n"; - exit 1; -}; - -print "Your user has been created. Try logging in!\n"; - -exit 0; diff --git a/usr/src/pinyadmin/sbin/pinyconfig b/usr/src/pinyadmin/sbin/pinyconfig deleted file mode 100755 index f6752db..0000000 --- a/usr/src/pinyadmin/sbin/pinyconfig +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Piny; - -my ( $reponame, $attr, $value ) = @ARGV; - -if ( not defined $reponame or not defined $attr ) { - die "Usage: $0 reponame tweakable [value]\n"; -}; - -$attr = lc $attr; -$attr =~ s/\./_/g; - -my $repo = Piny::Repo->new( $reponame ); - -if ( defined $value ) { - undef $@; - eval { - $repo->config->$attr( $value ); - }; - if ( $@ ) { - print STDERR "$attr is not a legal tweakable, or $value is not a legal value for that tweakable.\n$@\n"; - }; - if ( $value ne $repo->config->$attr ) { - print STDERR "Failed to set $attr (perhaps an override is in place)\n"; - }; -}; - -undef $@; -eval { - print "$attr = " . $repo->config->$attr . "\n"; -}; -if ( $@ ) { - print STDERR "$attr is not a legal tweakable, or its current value is illegal.\n$@\n"; -}; diff --git a/usr/src/pinyadmin/sbin/rebuildrepo b/usr/src/pinyadmin/sbin/rebuildrepo deleted file mode 100755 index 9d4e359..0000000 --- a/usr/src/pinyadmin/sbin/rebuildrepo +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Piny; - -foreach my $reponame ( @ARGV ) { - - my $repo = Piny::Repo->new( $reponame ); - - $repo->rebuild; - -}; diff --git a/usr/src/pinyadmin/sbin/rmaccess b/usr/src/pinyadmin/sbin/rmaccess deleted file mode 100755 index d6c22a9..0000000 --- a/usr/src/pinyadmin/sbin/rmaccess +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Piny; - -my $env = Piny::Environment->instance( ); - -my ( $reponame, @users ) = @ARGV; - -my $repo = Piny::Repo->new( $reponame ); - -if ( $repo->owner->uid != $env->user->uid ) { - print "You are not the owner of that repo!\n"; - exit( 3 ); -}; - -$repo->remove_access( map { Piny::User->new( $_ ) } @users ); diff --git a/usr/src/pinyadmin/sbin/rmrepo b/usr/src/pinyadmin/sbin/rmrepo deleted file mode 100755 index dff8fe5..0000000 --- a/usr/src/pinyadmin/sbin/rmrepo +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use Piny; - -my $env = Piny::Environment->instance( ); - -foreach my $reponame ( @ARGV ) { - - my $repo = Piny::Repo->new( $reponame ); - - if ( $env->user->uid != 0 and $repo->owner->uid != $env->user->uid ) { - print STDERR "You are not the owner of $reponame!\n"; - exit 1; - }; - - $repo->destroy; - -}; |