WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: /etc/skel and extensions  (Read 1857 times)

Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
/etc/skel and extensions
« on: September 14, 2009, 06:02:40 PM »
Looking quickly through tc-config, it appears to me that extension unpacking happens after the user's home directory is set up, and that extension post-install scripts are run directly after extension loading.  However, with extensions containing files in /etc/skel, the files show up and get copied to the home dir, but trying to keep an extension PPI compatible and copying files into /etc/skel in a post-install script does not have the files end up in the home dir.  I would like understand why this is, and ask if it would be possible to have it so post-install scripts can be used to place files in the user's home dir.  Thanks!

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: /etc/skel and extensions
« Reply #1 on: September 14, 2009, 09:24:53 PM »
I place files in the /home directory like this when using the post install script when the file is stored under /usr/local/share/exensionname/dirname :

Code: [Select]
#!/bin/sh

TCHOME=`cat /etc/sysconfig/tcuser`


[ -f /home/"$TCHOME"/.config ] || rsync -aL /usr/local/share/exensionname/dirname/config-orig /home/"$TCHOME"/.config