News: This forum is now permanently frozen.
Pages: [1]
Topic: Modifying webGUI  (Read 5678 times)
« on: April 04, 2014, 07:23:52 »
vasiqmz *
Posts: 16

I want to modify the webGUI of m0n0wall. Wanted to ask do I have to recompile the whole image again after modifying the Php files or is there any other way that i can modify the webGUI ?

« Reply #1 on: April 04, 2014, 14:33:33 »
Lee Sharp *****
Posts: 517

The m0n0wall image is a compressed image inside a compressed image.  They also use a FreeBSD file system. (Actually Unix, but the key is not Linux or Windows)  So you need to uncompress and mount, and then uncompress and mount, edit, and then re-compress and re-compress, all from within FreeBSD.

So, yes this is doable.  But a build may be easier.
« Reply #2 on: April 04, 2014, 14:40:32 »
Lennart Grahl ***
Posts: 153

There is an easy way (for testing only) and I've used it while writing the scheduler.

You can upload the modified PHP files via exec.php without having to recompile everything.

A quick and dirty script will then copy these files into the correct directory.
Code:
chmod a+rx /tmp/*; mv /tmp/*.php .

But these files will be overwritten after a reboot. It's good for testing though.

After you're done and everything works fine just compile the whole image.
« Reply #3 on: April 04, 2014, 15:32:24 »
Fred Grayson *****
Posts: 994

I haven't tried it lately and the script is difficult to find, but doesn't Chris Buechler's workon.sh script allow the stock images to be modified? I have a copy of it somewhere and can dig it up is anyone wants it.

--
Google is your friend and Bob's your uncle.
« Reply #4 on: April 04, 2014, 17:50:41 »
Lee Sharp *****
Posts: 517

Michael Idima had one as well...  They automate things, but still need FreeBSD to run.  I used to have a VM that would automate all this, but it will not mount in current virtual machines.  I need to fix it. Smiley
« Reply #5 on: April 06, 2014, 12:57:14 »
vasiqmz *
Posts: 16

The m0n0wall image is a compressed image inside a compressed image.  They also use a FreeBSD file system. (Actually Unix, but the key is not Linux or Windows)  So you need to uncompress and mount, and then uncompress and mount, edit, and then re-compress and re-compress, all from within FreeBSD.

So, yes this is doable.  But a build may be easier.

But then doing this uncompressing & then again recompressing will double up the work because for every little or big change that i'll make in the files then to see the change i'll have to compress the files again. Is there any where I can modify the files in the OS itself so that I can see the changes without Compressing & Compressing again and make the changes permanent in the OS..
« Reply #6 on: April 06, 2014, 12:58:51 »
vasiqmz *
Posts: 16

I haven't tried it lately and the script is difficult to find, but doesn't Chris Buechler's workon.sh script allow the stock images to be modified? I have a copy of it somewhere and can dig it up is anyone wants it.


The workon.sh will allow me to modify & save the changes of the file in the FreeBSD OS ??
« Reply #7 on: April 06, 2014, 15:37:57 »
Fred Grayson *****
Posts: 994

workon.sh is a shell script that runs on FreeBSD. So you must have a machine (real or virtual) with FreeBSD installed to run the script on.

It decompresses a m0n0wall image file allowing you to make changes to files included in the image. Once you have made the changes, the script recompresses the m0n0wall image so that it can be installed and run in its now modified form.

--
Google is your friend and Bob's your uncle.
« Reply #8 on: April 10, 2014, 15:33:27 »
vasiqmz *
Posts: 16

workon.sh is a shell script that runs on FreeBSD. So you must have a machine (real or virtual) with FreeBSD installed to run the script on.

It decompresses a m0n0wall image file allowing you to make changes to files included in the image. Once you have made the changes, the script recompresses the m0n0wall image so that it can be installed and run in its now modified form.


That'll be very helpful for me for Redesigning the UI. Can you plz provide me with the link of workon.sh because I tried to look up on Google but don't know which one is the right script to use.
« Reply #9 on: April 10, 2014, 18:13:05 »
Fred Grayson *****
Posts: 994

I emailed you a copy.

--
Google is your friend and Bob's your uncle.
« Reply #10 on: April 10, 2014, 18:48:48 »
vasiqmz *
Posts: 16

I emailed you a copy.

Got the copy .. thanks
« Reply #11 on: April 11, 2014, 21:37:17 »
azdps **
Posts: 63

There is an easy way (for testing only) and I've used it while writing the scheduler.

You can upload the modified PHP files via exec.php without having to recompile everything.

A quick and dirty script will then copy these files into the correct directory.
Code:
chmod a+rx /tmp/*; mv /tmp/*.* .

But these files will be overwritten after a reboot. It's good for testing though.

After you're done and everything works fine just compile the whole image.

This method will be your best bet for testing your modifications. Once your done with all your modifications, you can use the workon.sh script to make the changes permanent to a firmware image file.

To get to where you need to upload the modified file goto https://192.168.0.1/exec.php or whatever your m0n0wall address is to access the webgui.

Also the last time i tried the workon.sh script it didn't work out so well. I think mount worked but unmount didn't. I don't really recall. Might need to be modified a little.
« Last Edit: April 12, 2014, 03:59:47 by azdps »
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines