WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Webmin 1.52 Extension (making one ?)  (Read 3319 times)

Offline Terminator3000

  • Jr. Member
  • **
  • Posts: 64
Webmin 1.52 Extension (making one ?)
« on: October 06, 2010, 07:52:16 AM »
Hi as a follow up to my post on Busybox here http://forum.tinycorelinux.net/index.php?topic=7405.0 Ive got a related query.
I installed Webmin 1.52,a server admin interface, which went fine except that I forgot to include all the new files and folders in /opt/.filetool.lst and they promptly disappeared on reboot!
So,I'm doing them again but am wondering if I could create a tcz extension of this whereby the problem wouldn't arise.

Webmin is available in tar.gz format but this contains a sh setup script which performs all the necessary actions.

I currently have little experience of C coding/compiling being only a student of Java and PHP so any tips on how to do this are welcome Thanks.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Webmin 1.52 Extension (making one ?)
« Reply #1 on: October 06, 2010, 04:23:23 PM »
To create an extension does not require C knowledge per se. In general this Wiki article should be a good starting place.

I'd suggest you ensure to use the '/usr/local' area of the filesystem (e.g. that any executables or scripts end up in '/usr/local/bin'). Having a shell script for installation indicates to me that no compilation was involved, so that should lessen your need to know C.

Offline Terminator3000

  • Jr. Member
  • **
  • Posts: 64
Re: Webmin 1.52 Extension (making one ?)
« Reply #2 on: October 06, 2010, 07:12:41 PM »

The format it is in (sh setup script) installs easily with the defaults already set,so I just would need to find out in the wiki how this can be changed to tcz format ie is it OK to put an install script in tcz format?

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Webmin 1.52 Extension (making one ?)
« Reply #3 on: October 06, 2010, 07:57:15 PM »
Re-running this install script every time you install your private extension might be technically feasible, but rather quirky (if not inefficient).

In the end you'll have to figure out what this install script does, i.e. which additional files it stores in which directory. Probably along the lines of what section 4 of the Wiki suggests: the file names would have to be put into a list (similar to what the 'find' command achieves in the Wiki), and then a temporary tar-archive would have to be created that contains the files in their hopefully "TC-compatible" setup. This tar-archive finally needs to be converted into an SquashFS file which is your target extension. I personally would prefer to skip over the tar-archive step, and go straight into setting up the target directory structure, but that depends on how well one knows certain commands.

Please make a really serious effort in reading the Wiki and working out what the suggested commands are doing (e.g. checking out man-pages, as can be found on http://linux.die.net ). I for one are not planning to serve you every single command on a "silver platter".

Offline Terminator3000

  • Jr. Member
  • **
  • Posts: 64
Re: Webmin 1.52 Extension (making one ?)
« Reply #4 on: October 07, 2010, 01:16:50 AM »
I'll have a read through and see.Obviously dont want it re-installing on every reboot,the install script tells me what the default directories are so hopefully I might be able to figure it out,Thanks.

Offline Terminator3000

  • Jr. Member
  • **
  • Posts: 64
Re: Webmin 1.52 Extension (making one ?)
« Reply #5 on: October 07, 2010, 02:50:13 AM »
Also Webmin is written entirely in  Perl 5 I just discovered.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: Webmin 1.52 Extension (making one ?)
« Reply #6 on: October 07, 2010, 02:59:00 AM »
Webmin will be a very useful addition to the TC repository, I will keep a look out for it.  Good luck with your efforts.