06.12.2012 Aufrufe

Technische Dokumentation zum Unix-Verbund ... - Dr. Hubert Feyrer

Technische Dokumentation zum Unix-Verbund ... - Dr. Hubert Feyrer

Technische Dokumentation zum Unix-Verbund ... - Dr. Hubert Feyrer

MEHR ANZEIGEN
WENIGER ANZEIGEN

Erfolgreiche ePaper selbst erstellen

Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.

B.23 Addusers/checkwin2kusers 313<br />

# Alle user abchecken<br />

while($login = getpwent()) {<br />

if ($login =~ /^(\w\w\w\d\d\d\d\d)/) {<br />

if (! $orauser{$login}) {<br />

print "./adduser.Oracle $login\n";<br />

}<br />

}<br />

}<br />

B.23 Addusers/checkwin2kusers<br />

#!/soft/bin/perl<br />

#<br />

# Guckt nach wer keinen Win2k-Account hat<br />

#<br />

# list of oracle users holen<br />

open (WIN2K, "./lswin2kusers | sed 's/:.*//' |") || die;<br />

while() {<br />

chomp;<br />

if (/^(\w\w\w\d\d\d\d\d)/) {<br />

$win2kuser{$1} = 1;<br />

}<br />

}<br />

close(WIN2K);<br />

# Alle user abchecken<br />

while(($login, $comment) = ((getpwent())[0,5])) {<br />

last if $login eq "";<br />

}<br />

$comment =~ s/,.*$//;<br />

# print "login=$login, comment=$comment\n";<br />

if ($login =~ /^(\w\w\w\d\d\d\d\d)/) {<br />

if (! $win2kuser{$login}) {<br />

print "./adduser.win2k -c \"$comment\" -p $login<br />

$login\n";<br />

}<br />

}<br />

B.24 Backup/dumpbackup<br />

#!/bin/sh<br />

##########################################################################<br />

# The contents of this file are (c) Copyright 1996 by <strong>Hubert</strong> <strong>Feyrer</strong>.<br />

# Any use of the knowledge stored in this file may not be used outside<br />

# of the Fachhochschule Regensburg without contacting me first.<br />

###########################################################################<br />

TAPE=/dev/rmt/0c<br />

NTAPE=/dev/rmt/0cn<br />

FS="/ /home1 /home2 /home3"<br />

echo rewinding tape ...<br />

mt -f $NTAPE rewind<br />

echo starting backup: `date`<br />

for fs in $FS ;<br />

do<br />

echo `date`: dumping $fs<br />

ufsdump 0f $NTAPE $fs<br />

done<br />

(c) 1996-2003 <strong>Hubert</strong> <strong>Feyrer</strong> Stand: 21. Oktober 2003

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!