source:
freewrt/scripts/restore-defaultconf.sh@
483c323
| Last change on this file since 483c323 was a21663d, checked in by , 19 years ago | |
|---|---|
|
|
| File size: 359 bytes | |
| Line | |
|---|---|
| 1 | # $FreeWRT$ |
| 2 | |
| 3 | # restore patterns given in $@ |
| 4 | # in .config using defaults found |
| 5 | # in Config.default. |
| 6 | |
| 7 | restore() { # (pattern) |
| 8 | printf ',g/%s/d\nwq\n' "$1" | ed -s .config || return 1 |
| 9 | grep "$1" Config.default >>.config |
| 10 | return $? |
| 11 | } |
| 12 | |
| 13 | for pattern in "$@" ; do |
| 14 | restore "$pattern" || echo "WARNING: internal restoring of defaults by pattern $pattern failed!" |
| 15 | done |
Note:
See TracBrowser
for help on using the repository browser.
