OpenWrt Forum Archive

Topic: exroot: Better Configuration Workflow with git?

The content of this topic has been archived on 26 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have an OpenWRT router with an exroot, that I am configuring for OpenVPN, and since I store the configuration in git, my work flow goes like this:

1. Plugin the thumbdrive into the router.
2. Plugin / Boot up the router.
3. SSH into it
4. Make a change.
5. Test the change.
6. If it works, then poweroff the router
7. Plug my thumb drive into my computer.
8. Commit the changes with git.
9. Goto 1.

Is there a better way to do this?  Since I can't install git on the router itself, I can't just make the changes on the router.  Is it possible to use something like an nfs share to speed things up?

So you basically need to back up the config files from the router to the computer... can't you just transfer them using SCP or RSYNC, for example?

It isn't clear to me why you can't install git. Can you install a sftp server? It would allow you to mount the router's file system via sshfs on the computer.

It isn't clear to me why you can't install git. Can you install a sftp server? It would allow you to mount the router's file system via sshfs on the computer.

opkg doesn't list git;  Are you saying I should cross-compile it and install it manually?

I never tried installing sftp on it no; that's a good idea, but I tried running git over sshfs between two other machines (faster machines than my 400MHz router) and it was pretty slow; but mind you that the repo was on the remote machine and the git client was running locally...so I guess that's misusing it since you're supposed to push changes to a remote repo.

eduperez wrote:

So you basically need to back up the config files from the router to the computer... can't you just transfer them using SCP or RSYNC, for example?

I suppose; I just wanted to have a nice versioning history when I make changes to the configuration.  Ideally, I'd use etckeeper instead of git by itself.

leeand00 wrote:

It isn't clear to me why you can't install git. Can you install a sftp server? It would allow you to mount the router's file system via sshfs on the computer.

opkg doesn't list git;  Are you saying I should cross-compile it and install it manually?

Which version do you use? I found git in both 15.05.1 and 17.04.1.

mikma wrote:
leeand00 wrote:

It isn't clear to me why you can't install git. Can you install a sftp server? It would allow you to mount the router's file system via sshfs on the computer.

opkg doesn't list git;  Are you saying I should cross-compile it and install it manually?

Which version do you use? I found git in both 15.05.1 and 17.04.1.


I use 15.05...

Oh there it is...that must be new....actually I didn't find it with opkg search, but I did find it with opkg list and grep:

git - 2.3.5-1 - Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
git-http - 2.3.5-1 - Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.  This package allows git push/fetch over http(s) and ftp(s)

Sorry about that.

Guys,

1) If you don't want to reply to a specific portion of text, just hit the "Post reply" button instead of "Quote". There is no need to fullquote the previous posting.

2) @leeand00: it is called extroot. Please edit your first posting and correct it, in order to enable this posting to be found when searching for extroot.

leeand00 wrote:

Oh there it is...that must be new....actually I didn't find it with opkg search, but I did find it with opkg list and grep

Actually the command you were looking for is "opkg find". (opkg search expects a file path, such as /usr/bin/git.)

The discussion might have continued from here.