News: This forum is now permanently frozen.
Pages: [1]
Topic: Altering PHP System Pages  (Read 2742 times)
« on: May 10, 2011, 21:05:18 »
babolat *
Posts: 7

I am currently running a v1.32 on VMWare. I have altered the HTML/PHP of several of the web GUI pages, specifically:

.../index.php
.../servies_captiveportal_users.php
.../services_captiveportal_users_edit.php
.../status_captiveportal.php
.../system_firmware.php

The alterations work exactly as expected. However, when the VM is rebooted all pages revert to their originals, thus causing the changes to be lost. Is there a certain script that is replacing these pages on every reboot? What can I do to ensure the pages retain untouched when a reboot occurs?

Thank you for any feedback.

« Reply #1 on: May 10, 2011, 21:39:46 »
brushedmoss ****
Posts: 446

read this thread for clues on how to make your changes stick

http://forum.m0n0.ch/index.php/topic,4215.0.html#msg13576
« Reply #2 on: May 11, 2011, 16:17:13 »
babolat *
Posts: 7

Ok, first step looks like I'll need FreeBSD installed to run the workon.sh script and open the image. I put the request thru to our system admins to create me a VM running release 7.4.

I'm a net admin by profession so this will knock off a lotta rust from my undergrad. It's been a long time since I've done any minor dev. I'm sure I'll have more questions as I get going, but thanks for a push in the right direction...
« Reply #3 on: May 16, 2011, 21:20:27 »
babolat *
Posts: 7

Code:
mnwin01t#bash workon.sh generic-pc-1.33.img
mnwin01t#bash: Command not found.

Attempting to open the image for editing.
Should I not be using bash? Has the command changed?
« Reply #4 on: May 17, 2011, 12:54:10 »
Hans Maulwurf **
Posts: 56

Did you install bash? FBSD comes with zsh iirc, and you need to install bash using ports or sysinstall.
« Reply #5 on: May 23, 2011, 17:37:18 »
babolat *
Posts: 7

Ok, installed bash.

Here is the situation:

1. Copied original image to VM, verify image via md5
2. I open image via bash for editing, copy php files using "cp"
3. "exit" bash to close image
4. verify image has been modified via differing md5 checksum
5. image fails to boot, VM reverts to PXE boot The image was mounted as a virtual CD drive. The original image boots fine when mounted identical.

Ideas on why the modified image is failing?
« Reply #6 on: May 26, 2011, 16:48:00 »
Hans Maulwurf **
Posts: 56

Not sure if this works with the CD images, I only tried this with the generic ones and mounted them as an HDD then.
« Reply #7 on: June 15, 2011, 18:04:37 »
babolat *
Posts: 7

Not sure if this works with the CD images, I only tried this with the generic ones and mounted them as an HDD then.

I edited the generic image, 'generic-pc-1.33.img' and the sys admins exported it as an .iso/.img that was then mounted as a "CD" in the virtual CDROM via VCenter.

I currently have the modified .img in /root of the server I wish to use as M0n0wall. Should I mount it as a filesystem using 'mount' and set the 'boot0' boot manager to boot from that filesystem? The install guides assume I have the .img on external media, which I why I originally attempted to install as a virtual CD ROM.

Thanks for the help thus far.
« Reply #8 on: June 15, 2011, 22:01:21 »
brushedmoss ****
Posts: 446

The easiest thing to do , is to install  unmodified mono wall on the server , then do a firmware upgrade using you modified .img as the firmware.
« Reply #9 on: June 15, 2011, 22:25:53 »
babolat *
Posts: 7

Thank you. Simple, and it worked.

I was trying to reinvent the wheel for no reason...
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines