From: Penny Leach Date: Thu, 3 Mar 2011 12:13:50 +0000 (+0100) Subject: removed eduforge profile X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0500bdc5a8293cd5aa4a42577d46a5f72426fe7d;p=vserverctl.git removed eduforge profile --- diff --git a/profile/eduforge/aptsources b/profile/eduforge/aptsources deleted file mode 100644 index 106a2a4..0000000 --- a/profile/eduforge/aptsources +++ /dev/null @@ -1,16 +0,0 @@ -# Citylink Mirror -#deb http://ftp.nz.debian.org/debian/ sarge main non-free -#deb-src http://ftp.nz.debian.org/debian/ sarge main -deb http://debian.catalyst.net.nz/debian/ sarge main non-free -deb-src http://debian.catalyst.net.nz/debian/ sarge main - -# Catalyst Packages -deb http://debian.catalyst.net.nz/catalyst stable catalyst - -# Security Updates -deb http://security.debian.org/ sarge/updates main -deb-src http://security.debian.org/ sarge/updates main - -# To match manage.eduforge.org -deb http://www.backports.org/debian sarge-backports main contrib non-free -deb http://volatile.debian.net/debian-volatile sarge/volatile main contrib non-free diff --git a/profile/eduforge/data/.bashrc b/profile/eduforge/data/.bashrc deleted file mode 100644 index 78e253c..0000000 --- a/profile/eduforge/data/.bashrc +++ /dev/null @@ -1,60 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples -shopt -s histappend - -. /etc/bash_completion -# If not running interactively, don't do anything -[ -z "$PS1" ] && return - -# don't put duplicate lines in the history. See bash(1) for more options -export HISTCONTROL=ignoredups - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in -xterm-color) - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' - ;; -*) - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' - ;; -esac - -[ -x ~/.sh_prompt ] && . ~/.sh_prompt - - -# enable color support of ls and also add handy aliases -if [ "$TERM" != "dumb" ]; then - eval "`dircolors -b`" - alias ls='ls --color=auto' - #alias dir='ls --color=auto --format=vertical' - #alias vdir='ls --color=auto --format=long' -fi - -# some more ls aliases -#alias ll='ls -l' -#alias la='ls -A' -#alias l='ls -CF' - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -#if [ -f /etc/bash_completion ]; then -# . /etc/bash_completion -#fi - -[ -r ~/.sh_aliases ] && . ~/.sh_aliases -[ -r ~/.sh_env ] && . ~/.sh_env -[ -r ~/.sh_func ] && . ~/.sh_func diff --git a/profile/eduforge/data/.pgpass b/profile/eduforge/data/.pgpass deleted file mode 100644 index 66d5127..0000000 --- a/profile/eduforge/data/.pgpass +++ /dev/null @@ -1 +0,0 @@ -*:*:*:gforge:wahP8xoo diff --git a/profile/eduforge/data/.sh_aliases b/profile/eduforge/data/.sh_aliases deleted file mode 100755 index ff4be64..0000000 --- a/profile/eduforge/data/.sh_aliases +++ /dev/null @@ -1,35 +0,0 @@ -alias ..='cd ..' -alias ...='cd ../..' -alias acs='apt-cache search' -alias agi='sudo aptitude install' -alias agu='sudo aptitude update' -alias cgd='cg-diff' -alias cgfixtags='cg-restore -f tags' -alias cgl='cg-log' -alias cgs='cg-status' -alias cp='cp -v' -alias df='df -h' -alias dotdirs='perl -e '\''$,="\n"; print grep { -d && /\.[^. ]+/ } <.*>; print "\n";'\''' -alias du='du -h' -alias florida='lftp sftp://luke@florida.wgtn.cat-it.co.nz' -alias gk2w='gitk --all --since=2.weeks.ago' -alias grep='egrep' -alias home='ssh -Xt 60.234.149.239' -alias la='ls -AXF --color=always' -alias ll='ls -lhXF --color=always' -alias lla='ll -hAXF --color=always' -alias ls='ls -XF --color=always' -alias mach='ssh mach.catalyst.net.nz' -alias mv='mv -v' -alias now='date +"%Y%m%d-%H%M%S"' -alias phtags='ctags --langmap=php:+.inc.html.class -R *' -alias rm='rm -v' -alias silence='sudo mount -t smbfs -o guest //silence/music /media/silence' -alias ~='cd ~' -alias kgd='GIT_EXTERNAL_DIFF=~/bin/fakediff cgd' -#alias ssh='bcvim --wrap-ssh --' -alias mdinfo='grep -e '\''^\$CFG->db'\'' config.php' -alias gs='git-status' -alias gl='git-log' -alias gd='git-diff' -alias gco='git-checkout' diff --git a/profile/eduforge/data/.sh_env b/profile/eduforge/data/.sh_env deleted file mode 100644 index aa27f39..0000000 --- a/profile/eduforge/data/.sh_env +++ /dev/null @@ -1,17 +0,0 @@ -# git development env -export GIT_AUTHOR_NAME=Luke\ Hudson -export GIT_COMMITTER_NAME=Luke\ Hudson -export GIT_COMMITTER_EMAIL=luke@catalyst.net.nz -export GIT_AUTHOR_EMAIL=luke@catalyst.net.nz -export PATH=$PATH:~/bin:~/code/perl:~/code/perl/pgtools:~/code/perl/moodle - -export EDITOR=/usr/bin/vim -export KARMDIR=~/.kde/share/apps/karm - -export CVS_RSH=ssh - -export GITSSH='git+ssh://git.catalyst.net.nz/var/git' -export GITHTTP='http://git.catalyst.net.nz/git' - -export PAPERSIZE="a4" -export PAPERCONF="/etc/papersize" diff --git a/profile/eduforge/data/.sh_func b/profile/eduforge/data/.sh_func deleted file mode 100644 index 0d67a28..0000000 --- a/profile/eduforge/data/.sh_func +++ /dev/null @@ -1,44 +0,0 @@ -function sbackup() { - if [ $# -eq 0 ] - then - echo -e "Usage:\n\tbackup(file)" - return - fi - bkp="$1.`now`" - sudo cp -v "$1" "$bkp" -} - -function backup() { - if [ $# -eq 0 ] - then - echo -e "Usage:\n\tbackup(file)" - return - fi - bkp="$1.`now`" - cp -v "$1" "$bkp" -} - -function cgc() { - if [ $# -lt 2 ] - then - echo -e "Uasge:\n\tcgc gitfile#branch targetdir" - return - fi - branch=$1 - dir=$2 - # echo "cloning from $branch to $dir" - cg-clone "git+ssh://git.catalyst.net.nz/var/git/$branch" "$dir" -} - -function q() { - [ $# -eq 0 ] && echo "Usage: q command" && return - $* >/dev/null 2>&1 & -} - -function finame () { - find . -iname '*'"$1"'*' -} -function firegex() { - find . -regextype egrep -regex "$1" -} - diff --git a/profile/eduforge/data/.vimrc b/profile/eduforge/data/.vimrc deleted file mode 100644 index f799738..0000000 --- a/profile/eduforge/data/.vimrc +++ /dev/null @@ -1,166 +0,0 @@ -set history:50 " keep 50 lines of command line history -set ruler " show the cursor position all the time -set incsearch " do incremental searching -set number " Line numbering -set mouse=a " Full mouse usage -" Tabstuff -set expandtab -set shiftwidth:4 -set tabstop:4 -set guifont:Bitstream\ Vera\ Sans\ Mono\ Bold\ 10 -set vb " Visual bell instead of annoying beeps -set shellcmdflag=-ic -set nowrapscan - -if !has("gui_running") - set bg=dark -else - colorscheme darkblue -endif - -syntax on - -" Only do this part when compiled with support for autocommands. -if has("autocmd") - " Enable file type detection. - " Use the default filetype settings, so that mail gets 'tw' set to 72, - " 'cindent' is on in C files, etc. - " Also load indent files, to automatically do language-dependent indenting. - filetype plugin indent on - - " Put these in an autocmd group, so that we can delete them easily. - augroup vimrcEx - au! - - " For all text files set 'textwidth' to 78 characters. - autocmd FileType text setlocal textwidth=78 - - " When editing a file, always jump to the last known cursor position. - " Don't do it when the position is invalid or when inside an event handler - " (happens when dropping a file on gvim). - autocmd BufReadPost * - \ if line("'\"") > 0 && line("'\"") <= line("$") | - \ exe "normal g`\"" | - \ endif - - augroup END -else - set autoindent " always set autoindenting on -endif " has("autocmd") - -" Don't use Ex mode, use Q for formatting -map Q gq - -" Movement mapping -imap  b -" Maps C-LEFT to back-word in insert mode and cmdline etc. -imap  w -" Maps C-RIGHT to fwd-word in insert mode and cmdline etc. -map  b -" Maps C-LEFT to back-word in normal mode -map  w -" Maps C-RIGHT to fwd-word in normal mode - -map  [5~ -" Ctrl+Up == PageUp -map  [6~ -" C+Down = PageDn -map  gg -" C+Home = go-begin -map  G -" C+End = go-end -imap  [5~ -" Ctrl+Up == PageUp -imap  [6~ -" C+Down = PageDn -imap  gg -" C+Home = go-begin -imap  G -" C+End = go-end - -" map F5 to save+execute current file -"map :w :execute '!clear;' . getcwd() . '/' . bufname('%') -"imap :w :execute '!clear;' . getcwd() . '/' . bufname('%') - -" Use F6 and C-F6 to move between files -"map :bn -"map [17;5~ :bp -"map! [17;5~ :bp -"map! :bn - -" Control+S saves, due to long habit -imap  :w -map  :w - -" F12 shows browser window -"map :call VE() -"imap :call VE() - -" F3 does what I expect (find next) -"cmap n -"map n - -" F10 shows list of sub's in current file -map :execute "grep sub ".bufname('%')^M^M:cw^M -" Alt+Insert toggles mouse on/off - -map [2;3~ :call ToggleMouse() -map! [2;3~ :call ToggleMouse() - -" Another long habit - Ctrl+Space for completion -imap  - - -"-------------------------------------------------------------------------------- -" Functions and commands -"-------------------------------------------------------------------------------- -" -command Rz :call Resolve() - -function VE() - let g:explVertical=1 - let g:explStartRight=1 - let g:explWinSize=45 - S - let g:explVertical=0 - let g:explStartRight=0 - let g:explWinSize=15 -endfu - -function ToggleMouse() - if &mouse=="a" - let &mouse="" - echo "Mouse disabled" - else - let &mouse="a" - echo "Mouse enabled" - endif -endfu - -function SplitSwitch() - let path=bufname("%") -endfu - -function Resolve() - let orig=substitute( bufname('%'), '.rej','','') - execute ':sp ' . orig - set ft:php -endfu - - -function Comment() - '<,'>s/^/#/ -endfu - - -set t_Co=88 - -"if has("terminfo") -" set t_Co=16 -" set t_AB=[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm -" set t_AF=[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm -"else -" set t_Co=16 -" set t_Sf=[3%dm -" set t_Sb=[4%dm -"endif diff --git a/profile/eduforge/data/eduforge.pgdump b/profile/eduforge/data/eduforge.pgdump deleted file mode 120000 index 4431876..0000000 --- a/profile/eduforge/data/eduforge.pgdump +++ /dev/null @@ -1 +0,0 @@ -/home/luke/eduforge.pgdump \ No newline at end of file diff --git a/profile/eduforge/data/eduforge_wiki.pgdump b/profile/eduforge/data/eduforge_wiki.pgdump deleted file mode 120000 index 6c7bbff..0000000 --- a/profile/eduforge/data/eduforge_wiki.pgdump +++ /dev/null @@ -1 +0,0 @@ -/home/luke/eduforge_wiki.pgdump \ No newline at end of file diff --git a/profile/eduforge/data/fix1252 b/profile/eduforge/data/fix1252 deleted file mode 100755 index f91ece5..0000000 Binary files a/profile/eduforge/data/fix1252 and /dev/null differ diff --git a/profile/eduforge/data/restoredb.sh b/profile/eduforge/data/restoredb.sh deleted file mode 100755 index 7143405..0000000 --- a/profile/eduforge/data/restoredb.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -cd /root -mkdir out -chmod a+rwX -R out -cd out -pg_restore -Ox ../eduforge.pgdump -f eduforge.sql -/root/fix1252 eduforge.sql eduforge_fixed.sql - -sudo -u postgres psql template1 -c "update pg_shadow set usesuper=true where usename='gforge'" - -psql -U gforge eduforge -f eduforge_fixed.sql 2>&1 > /root/eduforge_restore.log - -pg_restore -Ox -U gforge -d eduforge_wiki /root/eduforge_wiki.pgdump 2>&1 > /root/eduforge_wiki_restore.log - - -sudo -u postgres psql template1 -c "update pg_shadow set usesuper=false where usename='gforge'" diff --git a/profile/eduforge/files b/profile/eduforge/files deleted file mode 100644 index 4e075f2..0000000 --- a/profile/eduforge/files +++ /dev/null @@ -1,5 +0,0 @@ -eduforge.pgdump root -eduforge_wiki.pgdump root -fix1252 root -restoredb.sh root -.pgpass root diff --git a/profile/eduforge/options b/profile/eduforge/options deleted file mode 100644 index 27d7766..0000000 --- a/profile/eduforge/options +++ /dev/null @@ -1 +0,0 @@ -username diff --git a/profile/eduforge/packages b/profile/eduforge/packages deleted file mode 100644 index 6359835..0000000 --- a/profile/eduforge/packages +++ /dev/null @@ -1,31 +0,0 @@ -sudo -ssh -curl -locales -less -apache -libapache-dbi-perl -libapache-mod-choke -libapache-mod-perl -libapache-mod-ssl -libapache-mod-php4 -php4 -libphp-jpgraph -php4-cgi -php4-cli -php4-common -php4-domxml -php4-gd -php4-imagick -php4-ldap -php4-mcrypt -php4-mysql -php4-pear -php4-pgsql -php4-xslt -postgresql -postgresql-client -postgresql-contrib -cronolog -lsof - diff --git a/profile/eduforge/post-host b/profile/eduforge/post-host deleted file mode 100644 index 41f8f43..0000000 --- a/profile/eduforge/post-host +++ /dev/null @@ -1,10 +0,0 @@ -# Add a /etc/hosts entry on the HostOS -cat /etc/hosts > /etc/hosts.new -echo "${VSIPADDR} ${VSNAME}.$(hostname -f) ${VSNAME}" >> /etc/hosts.new -mv /etc/hosts.new /etc/hosts - -# Copy the user's password from the host -grep -v "^${PROFILEOPTION_username}" ${VSROOT}/etc/shadow > /vserver/.shadow -grep "^${PROFILEOPTION_username}" /etc/shadow >> /vserver/.shadow -mv /vserver/.shadow ${VSROOT}/etc/shadow - diff --git a/profile/eduforge/post-vserver b/profile/eduforge/post-vserver deleted file mode 100644 index 933f7df..0000000 --- a/profile/eduforge/post-vserver +++ /dev/null @@ -1,67 +0,0 @@ -echo "${PROFILEOPTION_username} ALL=(ALL) ALL" >> /etc/sudoers -DEBIAN_PRIORITY=critical; dpkg-reconfigure locales - - - -# Setup links to eduforge src -ln -s /usr/share/eduforge/etc /etc/gforge -ln -s /usr/share/eduforge/etc/httpd.conf /etc/apache/conf.d/gforge.httpd.conf -ln -s /usr/share/eduforge /usr/lib/gforge - - -# Setup db user and pg_hba.conf, and empty databases -sudo -u postgres createuser -A -d gforge -sudo -u postgres createdb -E UTF8 -O gforge eduforge -sudo -u postgres createdb -E LATIN1 -O gforge eduforge_wiki - -# insert gforge user into pg_hba.conf, at line 91 (suits this version of file) -sed -ri '88s/.*/\0\nlocal all gforge md5\n/' /etc/postgresql/pg_hba.conf -/etc/init.d/postgresql restart - -# For command-line convenience -sudo -u postgres createuser -a -d root -sudo -u postgres createdb root -O root - -## In case tsearch2 needs adding -- shouldn't if doing pg_restore from eduforge db. -# #(cd /usr/share/postgresql/7.4/main/contrib; sudo -u postgres psql eduforge < tsearch2.sql) - -# Enable apache mods -apache-modconf apache enable mod_env -apache-modconf apache enable mod_vhost_alias -apache-modconf apache enable mod_ssl - -# Enable postgresql extension for php -sed -ri '539s/.*/\0\nextension=pgsql.so\n/' /etc/php4/apache/php.ini -sed -ri '539s/.*/\0\nextension=pgsql.so\n/' /etc/php4/cli/php.ini -/etc/init.d/apache restart - -# Add gforge nix user etc. -groupadd gforge -useradd -g gforge -m gforge - -mkdir /home/groups -mkdir /usr/share/eduforge/homedirs -ln -s /home/groups /usr/share/eduforge/homedirs/groups - -(cd /usr/share/eduforge; ./setup) - -updatedb - -(cd /root; ./restoredb.sh) -#pg_restore -Ox -U gforge -d eduforge /root/eduforge.pgdump 2>&1 >/root/eduforge_restore.log -#pg_restore -Ox -U gforge -d eduforge_wiki /root/eduforge_wiki.pgdump 2>&1 > /root/eduforge_wiki_restore.log - -/etc/init.d/apache restart - -# Now set the password for gforge dbuser. This isn't done earlier so that pg_restores work (I hope) -sudo -u postgres psql template1 -c "alter user gforge with encrypted password 'wahP8xoo';" - - -echo ' - -You will probably have to do the following manually inside the vserver. - -cd /root -./restoredb.sh - -' diff --git a/profile/eduforge/pre-host b/profile/eduforge/pre-host deleted file mode 100644 index 8cfea41..0000000 --- a/profile/eduforge/pre-host +++ /dev/null @@ -1,22 +0,0 @@ -mkdir /etc/vservers/${VSNAME}/scripts -p -mkdir /vserver/${VSNAME}/data -p - -echo '/home' > /etc/vservers/${VSNAME}/namespace-cleanup-skip - -if [ -d /home/${PROFILEOPTION_username}/src/${VSNAME}/ ]; then - cat >/etc/vservers/${VSNAME}/scripts/pre-start << EOF - #!/bin/bash - mkdir -p /vserver/${VSNAME}/usr/share/${VSNAME}/ - mount --bind /home/${PROFILEOPTION_username}/src/${VSNAME}/ /vserver/${VSNAME}/usr/share/${VSNAME}/ - -EOF - chmod 755 /etc/vservers/${VSNAME}/scripts/pre-start - - cat >/etc/vservers/${VSNAME}/scripts/post-stop << EOF - #!/bin/bash - - umount /vserver/${VSNAME}/usr/share/${VSNAME} -EOF - chmod 755 /etc/vservers/${VSNAME}/scripts/post-stop - -fi diff --git a/profile/eduforge/pre-vserver b/profile/eduforge/pre-vserver deleted file mode 100644 index aeea058..0000000 --- a/profile/eduforge/pre-vserver +++ /dev/null @@ -1,12 +0,0 @@ -if [ "$VSRELEASE" = "sarge" ]; then - echo "running pwconv" - pwconv -fi -cp /usr/share/zoneinfo/NZ /etc/localtime -echo "${VSIPADDR} ${VSNAME}" >> /etc/hosts -echo 'locales locales/locales_to_be_generated select en_NZ ISO-8859-1, en_NZ.UTF-8 UTF-8' | debconf-set-selections - - -echo 'debconf debconf/priority select critical' | debconf-set-selections -echo 'exim4-config exim4/dc_eximconfig_configtype string mail sent by smarthost; no local mail' | debconf-set-selections -echo 'exim4-config exim4/dc_smarthost string smtp.catalyst.net.nz' | debconf-set-selections diff --git a/profile/eduforge/profile.conf b/profile/eduforge/profile.conf deleted file mode 100644 index f1cf346..0000000 --- a/profile/eduforge/profile.conf +++ /dev/null @@ -1,11 +0,0 @@ -parent = -release = sarge -mirror = http://debian.catalyst.net.nz/debian -inherit-aptsources = yes -inherit-packages = yes -inherit-pre-vserver = yes -inherit-pre-host = yes -inherit-post-vserver = yes -inherit-post-host = yes -inherit-files = yes -inherit-templates = yes diff --git a/profile/eduforge/remove-host b/profile/eduforge/remove-host deleted file mode 100644 index 590c832..0000000 --- a/profile/eduforge/remove-host +++ /dev/null @@ -1,11 +0,0 @@ -# Remove /etc/hosts entry on the host OS -grep -v "^${VSIPADDR}" /etc/hosts > /etc/hosts.new -mv /etc/hosts.new /etc/hosts - -# this isn't set because we don't pass options to remove -# USR=$PROFILEOPTION_username -USR=penny - -grep -v "^${VSNAME}" /home/${USR}/.ssh/known_hosts > /home/${USR}/.ssh/known_hosts.new -chown ${USR}:${USR} /home/${USR}/.ssh/known_hosts.new -mv /home/${USR}/.ssh/known_hosts.new /home/${USR}/.ssh/known_hosts