Is uci potentially dangerous?

I used the code given here to set up a guest network.

Am I dreaming or was guest network configuration a simple Luci menu item back in the old days of OpenWrt 18.x?

Being somewhat lazy and, more importantly, wishing to prevent blunders caused by (for instance) not following all instructions in the 'manual' version of setting up a guest network (the link to which escapes me for the moment), I decided to string those uci commands together into a script.
The end result? It completely knocked out my PPPoE connection, and (I suspect) nuked one half of a twin WAN port on my brand new Flint 2. I don't know if this was simply an unfortunate coincidence, or what.

You are, there have never been assistants doing this or similar on OpenWrt.

Nothing a factory reset can't fix. Yes, this might not be a helpful remark, but without a closer description there isn't anything else to say - and your "twin WAN port" already sounds like a heavily customized setup.

What I do know, is that a friend successfully set up a guest WLAN on their new gl-mt6000 this weekend following the wiki (and their PPPoE connection remained unaffected).

uci is a direct link into the configuration system of your router, it can do anything (and more) the webinterface can do, it is recommended to understand each step and not to execute random snippets blindly - especially on heavily customized systems. Backups and before- after comparisons are helpful.

Thank you - I was probably confusing an old Luci with some proprietary interface.

As for the 'accident', I thought to myself "should be no problem since I've taken a backup prior to running the uci commands". But it never restored the status quo. I then reinstated my ISP's router and the PPPoE problem disappeared. I knew then that something had not gone wrong with my ISP's operation. It wasn't until I plugged in to the 'other part' of the WAN port that PPPoE came back up.

Yes I'm old and grumpy but that's why you write the config files but don't try to hatch commanda like you are on Cisco and then wonder where it did break....

Well, more precisely, I'm wondering how such a sequence of commands can appear to destroy one of these ports:

Did you already set the device into failsafe mode?
Did you already set the device into first boot mode?
Did you already reflashed the device?

Thanks to global terrorisim propaganda I'm unable to search for this glory horror shocker Computer Magazin article from back in the ages which claimed

IT WILL TURN YOUR HARD DRIVE INTO A BOMB!!

So, please, failsafe; first_boot, first...

I think the word you are looking for is misconfigured.

2 Likes

I'll try to express what @slh and @_bernd wrote in a more formal way. In order for a piece of hardware connected to a computer (and router running an operating system is a computer for this matter) to be operational, 2 conditions must be satisfied: a. working hardware; b. compatible and correctly configured software.

You described a situation where you changed something in your config, and then a part of the hardware stopped working. Somehow it looks like you are jumping to the conclusion that the config change broke the hardware and not considering the simple possibility that you might have misconfigured the software. Which, by the way, is much more likely the case.

5 Likes

I think you're partly correct here. Yes, I could well be jumping to a conclusion but the misconfiguration explanation doesn't quite cut it. The simple reason for that is that I restored a working configuration with out any effect.

At the moment I'm looking into very fundamental hardware issues with my ISP such as bad FTTP cabling and bad splicing of that cable since restoring my ISP's own router with default settings also does not work as far as PPPoE is concerned. fyi they did my installation twice and I'm not over confident about the result of the second one.

1 Like

I think it might be that the 2nd port was not connected even before you started to change the config, but you only noticed that while checking the state of the system after config change. Otherwise, we have to assume that both things coincidentally happened at the same time, which is not very likely, but also not impossible. Anyway, after you figure out the issue with ISP, if you need more help with setting up OpenWrt for this particular use case, you can create a new thread, and as long as you do not make strong unsubstantiated claims, I'm sure that you will get help.

1 Like

As you don't know if your old config worked - or was restored completely/ correctly (as you have never tested this before), this doesn't tell us much (anything).

Really, only a factory reset will provide any insight.

Running uci scripts blindly on a heavily customized system is very likely to mess up your configuration (beyond the point of things not working), but it cannot damage the hardware permanently - firstboot will fix it.

That's what I would have thought and that's probably a relief in that case. I think I was probably jumping to the wrong conclusion owing to panic. Thank you