LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-03-2017, 02:51 PM   #16
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 1,618

Rep: Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629

Quote:
Originally Posted by Darth Vader View Post
That nasty folder on / appeared after the latest font adventures...
No i have this since longtime.
 
Old 05-03-2017, 06:01 PM   #17
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226Reputation: 1226
In my case, this stray /.cache folder appeared after the last updates in slackware-current.
 
Old 05-04-2017, 04:20 AM   #18
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 2,089

Rep: Reputation: 441Reputation: 441Reputation: 441Reputation: 441Reputation: 441
I don't have this problem.

What are you running on boot?
 
Old 05-04-2017, 09:48 AM   #19
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 1,618

Rep: Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629
Robby, it's due to rc.networkmanager, when is inactived the .config isn't created at boot

I think it starts too early in the init, because when you start it under x, there is no problem

Last edited by gmgf; 05-04-2017 at 10:02 AM.
 
3 members found this post helpful.
Old 05-04-2017, 10:51 AM   #20
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware, Xubuntu
Posts: 278

Original Poster
Rep: Reputation: 39
By placing "echo -n "XXX: " ; ls -a /" statements in /etc/rc.{S,M} and drilling down I found that the /.cache file is created by the /usr/sbin/NetworkManager invocation done in /etc/rc.d/rc.networkmanager:
Code:
nm_start()
{
  .....
echo -n "M2cC: " ; ls -a /
  echo "Starting NetworkManager daemon:  $NETWORKMANAGER_BIN"
  $NETWORKMANAGER_BIN
echo -n "M2cD: " ; ls -a /
}
As /usr/sbin/NetworkManager is an "ELF 64-bit executable" my journey ends there.

Last edited by burdi01; 05-04-2017 at 10:58 AM.
 
2 members found this post helpful.
Old 05-04-2017, 10:51 AM   #21
allend
LQ Guru
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,002

Rep: Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750
Nice catch!
On my desktop, where I do not use NetworkManager, I do not see a /.cache directory. On my laptop, where I do use NetworkManager, I do see a /.cache directory.
 
Old 05-04-2017, 10:57 AM   #22
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware, Xubuntu
Posts: 278

Original Poster
Rep: Reputation: 39
Yes, after installing wicd the /.cache directory is no longer created.
 
Old 05-04-2017, 01:28 PM   #23
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,310

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Quote:
Originally Posted by gmgf View Post
Robby, it's due to rc.networkmanager, when is inactived the .config isn't created at boot

I think it starts too early in the init, because when you start it under x, there is no problem
That is interesting, but it doesn't happen here...
I also don't see anywhere in NM source that uses any .cache directory :/
 
Old 05-04-2017, 01:46 PM   #24
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,310

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Humor me on this. Before the NM invocation stanza, add a "sleep 2" and then your echo/ls line and see what happens. I think it might be bluez doing it but it just takes a bit of time and NM gets started before that cache dir is created...
 
1 members found this post helpful.
Old 05-05-2017, 03:23 AM   #25
allend
LQ Guru
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,002

Rep: Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750
I think bluez is a false trail. The laptop where I observe the problem does not have /etc/rc.d/rc.bluetooth executable.
I added a call in /etc/rc.d/rc.S just before the stanza to configure ISA Plug and Play devices to a script to watch for the creation of a directory in /
Code:
#!/bin/sh

while inotifywait -e create / ; do
  ps axww >> /tmp/clog.txt
done &
The resulting output seems to confirm NetworkManager as the culprit.
Code:
  756 ?        Ss     0:00 /sbin/mount.ntfs /dev/sda2 /xp-c -v -o ro,noexec,nosuid,nodev,umask=022,users
  759 ?        Ss     0:00 /sbin/mount.ntfs-3g /dev/sda3 /xp-d -v -o rw,umask=022
  774 ?        S      0:00 /usr/sbin/cgmanager --daemon
  794 ?        Ss     0:00 /bin/sh /etc/rc.d/rc.M
  806 ?        Ss     0:00 /usr/sbin/syslogd
  810 ?        Ss     0:00 /usr/sbin/klogd -c 3 -x
  811 ?        R      0:01 /usr/bin/fc-cache -f
  920 ?        Ss     0:00 /usr/bin/dbus-daemon --system
  921 ?        S      0:00 sh /etc/rc.d/rc.networkmanager start
  926 ?        D      0:00 /usr/sbin/NetworkManager
  927 ?        R      0:00 ps axww

Last edited by allend; 05-05-2017 at 03:25 AM.
 
3 members found this post helpful.
Old 05-05-2017, 03:40 AM   #26
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 1,618

Rep: Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629Reputation: 629
Yes, i have one other install of current with openrc, and this install, doesn't have this cosmetic problem.
 
Old 05-05-2017, 04:22 AM   #27
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,425

Rep: Reputation: 830Reputation: 830Reputation: 830Reputation: 830Reputation: 830Reputation: 830Reputation: 830
Hmmm ... an interesting, if harmless issue here ...

I've done this to myself from time to time by referencing an unitialized or a misspelled Directory Variable in a /bin/sh script.

Example:
Code:
THE_DIR=                 # THE_DIR is unitialized but not on purpose :)
mkdir ${THE_DIR}/.cache  # oops ... ${THE_DIR} will be created as /.cache
#
# or a misspelling ...
#
THE_DIR="$HOME"          # Initialize THE_DIR
mkdir ${THEDIR}/.cache   # but misspell THE_DIR when I reference it and oops[2]
Since I don't run many scripts as root, and because a joe user cannot create a Directory in the fs root, the above code fails if I bother to check RetCodes

OTOH, if I run such code as root, I end up with an unintended directory in the fs root.

Just sayin'

Anyhow, like burdi01, I found no references to a .cache directory in any Current NetworkManager files and I am running wicd so I have no /.cache directory on my systems.

But NetworkManager requires dbus ( another Project with the LoveBucket name on it ) and I do have a $HOME/.cache/dbus/ directory.

I've not scanned the dbus code but I wonder if the XDG_DATA_HOME variable that 55020 found affects the location of the .cache/dbus/ directory ?

But then, how would one set XDG_DATA_HOME during boot ???

-- kjh
 
Old 05-05-2017, 04:37 AM   #28
burdi01
Member
 
Registered: Dec 2010
Location: The Netherlands
Distribution: Slackware, Xubuntu
Posts: 278

Original Poster
Rep: Reputation: 39
@rworkman:
Quote:
I think it might be bluez doing it but it just takes a bit of time and NM gets started before that cache dir is created...
That would be in contradiction with my finding that when using wicd (which precludes NM) the /.cache directory is not created.
Also, just as allend, I do not have bluez enabled (actually it is not even installed).

Anyway, I did as requested (and with an even longer sleep):
Code:
nm_start()
{
.....
echo -n "M2cB2: " ; ls -a /
echo "sleep 5" ; sleep 5
echo -n "M2cC: " ; ls -a /
  echo "Starting NetworkManager daemon:  $NETWORKMANAGER_BIN"
  $NETWORKMANAGER_BIN
echo -n "M2cD: " ; ls -a /
}
The .cache directory first pops up with the "M2cD" display.

Last edited by burdi01; 05-05-2017 at 04:39 AM.
 
1 members found this post helpful.
Old 05-05-2017, 08:15 AM   #29
allend
LQ Guru
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 5,002

Rep: Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750Reputation: 1750
This is working for me to stop the creation of /.cache directory.
Code:
bash-4.4$ diff ./a/rc.networkmanager ./b/rc.networkmanager 
36c36
<   $NETWORKMANAGER_BIN
---
>   XDG_CACHE_HOME=/root/.cache $NETWORKMANAGER_BIN
From https://standards.freedesktop.org/ba...ec-latest.html
Quote:
$XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used.
 
3 members found this post helpful.
Old 05-05-2017, 09:08 AM   #30
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,310

Rep: Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828Reputation: 828
Quote:
Originally Posted by burdi01 View Post
@rworkman:
That would be in contradiction with my finding that when using wicd (which precludes NM) the /.cache directory is not created.
Also, just as allend, I do not have bluez enabled (actually it is not even installed).

Anyway, I did as requested (and with an even longer sleep):
Code:
nm_start()
{
.....
echo -n "M2cB2: " ; ls -a /
echo "sleep 5" ; sleep 5
echo -n "M2cC: " ; ls -a /
  echo "Starting NetworkManager daemon:  $NETWORKMANAGER_BIN"
  $NETWORKMANAGER_BIN
echo -n "M2cD: " ; ls -a /
}
The .cache directory first pops up with the "M2cD" display.
Well, here's the feedback from thaller in #networkmanager:
Quote:
19:56 < thaller> rworkman, seems related to glib and using the session bus... which uses "$XDG_RUNTIME_DIR/bus" as path... but NM should ever access the
session bus, something is wrong there.
14:05 < rworkman> thaller: re glib & session bus, it's definitely somehow related to NM, but no idea how :/
14:06 < thaller> rworkman, grep in glib sources where they create the .cache directory (not many places), install debugging symbols, and run in debugger with
a breakpoint
14:07 < thaller> I guess, you could also get a backtrace using systemtap, but I am not familiar enough with that.
Anybody feel up to that? :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] latest hplip on current64 Launfal Slackware 34 06-10-2016 06:27 PM
[SOLVED] Current64 sound has a mind of its own Gordie Slackware 20 02-22-2016 06:32 AM
[SOLVED] Pdfshuffler and poppler in current64 aszabo Slackware 3 02-01-2016 11:01 AM
[SOLVED] -current64 aclocal segfault KaMii Slackware 8 11-07-2015 12:46 AM
Autokey and current64 charlie_lab Slackware 4 03-20-2010 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration