Probleme mit /tmp

E

Edward Nigma

Ich hab seit gerade eben mords Probleme mit /tmp.
Wenn ich mein System boote kommt folgende Fehlermeldung

Cleaning /tmpfind: warning: you have specified the -maxdepth option after a non-option argument -perm, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments.
Fri Jun 10 16:46:58 2005: find: warning: you have specified the -depth option after a non-option argument !, but options are not positional (-depth affects tests specified before it as well as those specified after it). Please specify options before other arguments.

Das seltsame ist nur, daß ich auf meinem System keinen Ordner habe der /tmpfind heißt.
Ich steh bestimmt mal wieder aufm Schlauch und es ist was ganz einfaches wie ich mich kenne.
Hat einer zufällig ne Lösung für mich???
 
Vielleicht fehlt nur nen Leerzeichen dann heißt es "/tmp find"...
 
Kann auch sein.
Eine Lösung hab ich trotzdem noch nicht gefunden. :(
 
Kannst Du herausfinden, an welcher Stelle beim Booten die Meldung kommt, d.h. welches Start-Script eventuell verantwortlich ist?
Ich glaub bootclean.sh und bootmisc.sh wären eventuell Kandidaten zum untersuchen ...
 
Zur Not kannst'e das entsprechende Script auch mit grep ausfindig machen... komisch, selbst beim googlen hatte ich keine Ergebnisse ?(

Mfg, Lord Kefir
 
Goodspeed1978 schrieb:
Ich glaub bootclean.sh und bootmisc.sh wären eventuell Kandidaten zum untersuchen ...

Ok, jetzt bin ich komplett verwirrt. bootmisc.sh und bootclean.sh werden weder von find noch von grep gefunden. :(
 
?? Sind zwei Scripts unter /etc/init.d/ ... aus Paket initscripts wenn ich mich recht erinnere ...
 
Hallo,

gibt es auf Linux unter /etc eine "rc.conf"? :think:
Da habe ich auf FreeBSD den Befehl zum /tmp löschen drin:
Code:
###################################
# Clear /tmp at Startup				
##################################

clear_tmp_enable="YES"


Gruß, Fusselbär
 
Kannst du mir das Script bootclean.sh mal eben posten?
 
Ich habe nach erschiedenen Variationen dieser Fehlermeldung gesucht und bin immer wieder auf XFS gestossen. Dass da /tmp mit reinrutscht könnte auch einfach nur nen fehlendes newline hinter "Cleaning /tmp" sein (wie schon gesagt wurde).

Aber ich denke, dass es wie gesagt mit einem Dienst (der hier wohl XFS is) der nach "Cleaning /tmp" geladen wird zutun hat.

Ca bei Line 39 im xfs init script
sollte folgendes (oder ähnliches) stehen:

Code:
if [ ! -e fonts.dir -o -n "$(find . -perm bla -depth bla -maxdepth 1 -cnewer fonts.dir -not -name 'fonts.cache*')" ]; then

Verusch mal
Code:
"-maxdepth 1"
vor
Code:
"-perm bla"
und
Code:
-depth bla
zu setzen.
Oder halt nach diesem Beispiel orientieren. Zumindest sollte -maxdepth zuerst hinter find . kommen.
 
Zuletzt bearbeitet:
Zufälligerweise ist meine / Partition in XFS. Ja dann muss ich mich mal auf die suche machen.
 
Code:
#
# bootclean.sh  Functions to clean /tmp, /var/run and /var/lock.
#
# Version:      @(#)bootclean.sh  2.86-2  27-Aug-2004  [email]miquels@cistron.nl[/email]
#

cleantmp() {

        [ -f /tmp/.clean ] && return

        # Don't clean /tmp if TMPTIME < 0 or "infinite".
        case "$TMPTIME" in
                -*|infinite)
                        return
                        ;;
        esac

        #
        #       Wipe /tmp, but exclude system files.
        #       Note that files _in_ lost+found _are_ deleted.
        #
        [ "$VERBOSE" != no ] && echo -n " /tmp"
        #
        #       If $TMPTIME is set to 0, we do not use any ctime expression
        #       at all, so we can also delete files with timestamps
        #       in the future!
        #
        if [ "$TMPTIME" = 0 ]
        then
                TEXPR=""
                DEXPR=""
        else
                TEXPR="-mtime +$TMPTIME -ctime +$TMPTIME -atime +$TMPTIME"
                DEXPR="-mtime +$TMPTIME -ctime +$TMPTIME"
        fi

        rm -f /tmp/.clean
        set -o noclobber
        :> /tmp/.clean
        set +o noclobber

        #
        #       Only clean out /tmp if it is world-writable. This ensures
        #       it really is a/the temp directory we're cleaning.
        #
        EXCEPT='! -name .
                ! ( -path ./lost+found -uid 0 )
                ! ( -path ./quota.user -uid 0 )
                ! ( -path ./aquota.user -uid 0 )
                ! ( -path ./quota.group -uid 0 )
                ! ( -path ./aquota.group -uid 0 )
                ! ( -path ./.journal -uid 0 )
                ! ( -path ./.clean -uid 0 )
                ! ( -path './...security*' -uid 0 )'

        ( if cd /tmp && [ "`find . -perm -002 -maxdepth 0`" = "." ]
          then
                # First remove all old files.
                find . -xdev $TEXPR $EXCEPT \
                                ! -type d -depth -print0 | xargs -0r rm -f
                # And then all empty directories.
                find . -xdev $DEXPR $EXCEPT \
                                -type d -depth -empty -exec rmdir \{\} \;
                rm -f .X*-lock
          fi
        )
}

cleanlock() {
        #
        #       Clean up any stale locks.
        #

        [ -f /var/lock/.clean ] && return

        [ "$VERBOSE" != no ] && echo -n " /var/lock"
        ( cd /var/lock && find . ! -type d -exec rm -f -- {} \; )
        rm -f /var/lock/.clean
        set -o noclobber
        :> /var/lock/.clean
        set +o noclobber
}

cleanrun() {
        #
        #       Clean up /var/run.
        #

        [ -f /var/run/.clean ] && return

        [ "$VERBOSE" != no ] && echo -n " /var/run"
        ( cd /var/run && \
                find . ! -type d ! -name utmp ! -name innd.pid \
                -exec rm -f -- {} \; )
        rm -f /var/run/.clean
        set -o noclobber
        :> /var/run/.clean
        set +o noclobber
}

bootclean() {
                                                                           
        # Only run if find and xargs are available.
        if [ ! -x /bin/find ] && [ ! -x /usr/bin/find ]
        then
                return 0
        fi
        if [ ! -x /bin/xargs ] && [ ! -x /usr/bin/xargs ]
        then
                return 0
        fi

        if [ -f /tmp/.clean ] && [ -f /var/run/.clean ] &&
           [ -f /var/lock/.clean ]
        then
                return
        fi

        [ "$VERBOSE" != no ] && echo -n "Cleaning"
        [ -d /tmp ] && cleantmp
        [ -d /var/run ] && cleanrun
        [ -d /var/lock ] && cleanlock
        [ "$VERBOSE" != no ] && echo "."
}

Versuch doch erstmal "grep /tmp * -r" unter /etc/ ...

Ach ja ... und bitte nicht das Filesystem XFS mit dem X Font Server verwechseln ;)
 
Zuletzt bearbeitet:
Sorry, war keine Absicht. In dem Forum, in dem ich den Lösungsansatz rausgelesen hab, hatte nur anscheins das jemand auch verwechselt und irgendwie hab ich das stumpfsinnig wie ich bin gleich mitgetippt. :P
 
Hi,

Ich bin noch nicht so fit. Wie installiere ich ein älteres Paket.
Ich habe schon ein bischen geschaut und fand heraus das es mit einem

apt-get install findutils=4.1.20 funktionieren sollte.
Aber: Ich habe das Paket natürlich nicht lokal auf dem Rechner.

Wie bekomme ich es her und installiere es dann?
Muss ich das von Hand irgendwoher besorgen? Da gibt es doch
bestimmt eine elegantere Lösung.
 
Wenn ich ein downgrade gemacht habe, habe ich immer das Paket von Hand installiert. D.h. Paket vom Server holen und dann mit dpkg -i Paketname.deb installieren.
 
Man kann es auch recht einfach von Hand fixen:

/etc/init.d/bootmisc.sh.new:

aus der Zeile
Code:
( if cd /tmp && [ "`find . -perm -002 -maxdepth 0`" = "." ]
die Zeile
Code:
( if cd /tmp && [ "`find . -maxdepth 0 -perm -002`" = "." ]
machen. Also quasi die beiden Optionen tauschen.
 
Hi,

Ich habe da etwas Sorge das beim nächsten upgrade,
Änderungen die ich von Hand gemacht habe,
wieder gelöscht werden.

Was ich sonst noch so rausgefunden habe:
http://channel.debian.de/faq/ch-dpkgundco.html#s-oldpackages

Auf http://snapshot.debian.net/ gibt es dann einen Hinweis auf eine "apt-get specific ..." Variante.
Aus der bin ich aber nicht so ganz schlau geworden.

Wie auch immer:
Wenn man z.b. folgendes in seine source.list Einträgt:

deb http://snapshot.debian.net/archive pool findutils
deb-src http://snapshot.debian.net/archive pool findutils

und ein "apt-get update" macht, dann sieht man mit "apt-cache show"
das apt nun auch ältere Varianten bekannt sind.

Mit einem "apt-get -u install findutils=4.1.20-5" wird dann die
entsprechende Version installiert.

Die 2 zusätzliche Zeilen lass ich gerade in meiner source.liste
drin, bzw kommentier sie eben aus. Und wenn ich mal wieder
was altes brauche kann man das Wort "findutils" ja gegen einen
anderen Paketnamen austauschen. Und dann selbiges Spielchen.

Weiss jemand was es mit dem "apt.get specific" genau auf sich hat?
Mein apt-get kennt diese Funktion nicht.
 
Oder auch nicht.... Beim Download kommt ein freundliches "404 not found".
Also guuuut, dann eben doch Skript ändern.
 

Ähnliche Themen

Nginx als Reverse Proxy für Nextcloud und Emby

Zugriff Ubuntu 16.04. auf Freigabe 18.04. LTS nicht möglich

Senior System & Network Admin in Berlin

NagiosGrapher 1.7.1 funktioniert nicht

Samba 4 Gast Zugang unter Ubuntu funktioniert nicht

Zurück
Oben