Tiny Core Extensions > TCE Q&A Forum
PPI question-where does what file go in original apps.
softwaregurl:
--- Quote ---#copy some files if not there
if [ ! -f "$HOME"/.mediaswg ]; then
cp -r /usr/local/mediaswg/skel/.mediaswg "$HOME"/
fi
--- End quote ---
This works fine loading optional, but on boot it puts the files in /.mediaswg so $HOME must not be set yet. same problem with using sed on .jwmrc-tray (it creates /.jwmrc-tray). Is $USER set yet or a way to tell where home is?
using tinycore_1.3 and 1.2
curaga:
I see the issue. A fix would be to add
--- Quote ---export HOME=/home/"$USER"
--- End quote ---
at line 277 in tc-config (right after the line "mkdir -p /home/"$USER"")
edit: this location is for tc2
roberts:
No user is logged in during booting. So / is normal during the boot process.
I have always used /home/"$USER" based on the default stored in /etc/sysconfig/tcuser.
jls:
this is the explanation of the Filesystem Hierarchy Standard:
http://www.pathname.com/fhs/pub/fhs-2.3.html
mikshaw:
--- Quote from: softwaregurl ---on boot it puts the files in /.mediaswg so $HOME must not be set yet. same problem with using sed on .jwmrc-tray (it creates /.jwmrc-tray). Is $USER set yet or a way to tell where home is?
--- End quote ---
--- Quote from: roberts ---No user is logged in during booting. So / is normal during the boot process.
--- End quote ---
Depending on how the application itself is run, I think it might not be the most reliable method to copy files to one specific user's during boot. What happens if a different user logs in and tries to use the application...the mediaswg files don't exist for that user.
Also remember to chown files that are copied to an arbitrary user's directory.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version