Skip to content

Commit

Permalink
Add networktimeout=secs & docs
Browse files Browse the repository at this point in the history
  • Loading branch information
procount committed May 14, 2018
1 parent b49505d commit 4a8ca25
Show file tree
Hide file tree
Showing 28 changed files with 2,427 additions and 2,480 deletions.
633 changes: 278 additions & 355 deletions README.md

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions README_PINN.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The latest version of [PINN](http://downloads.sourceforge.net/projects/pinn/pinn

### - [If you have PINN v2.4.3 - v2.4.4b installed, please manually update to v2.4.4c](https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574&start=200#p1239359)

This README relates to v2.8.2
This README relates to v2.8.3

<sup>(PINN is only available in one format that does not include any operating systems at all. It is more akin to `NOOBS-lite` rather than `NOOBS`. For that reason, the filename that you download is called `pinn-lite.zip`)</sup>

Expand Down Expand Up @@ -375,7 +375,9 @@ The following is a complete list of all the PINN options that can be added to th

- **keyboardtriggerdisable**: Prevents a `SHIFT` keypress from entering Recovery Mode on boot (maybe you have a problematic keyboard which is erroneously triggering every time you boot)

- **remotetimeout=**: When used in conjunction with `forcetrigger` it sets a maximum timeout period for the recovery menu to be displayed before continuing to the boot selection dialog and potentially selecting a default OS to boot. This permits normal default OS booting, yet also allows for a remote user to interrupt the startup process to change the OS to boot, or perform any remote maintenance. Any screen interaction over VNC will cancel the timeout. This additional timeout will lengthen the boot time into a default OS, so choose a value that is long enough to allow VNC access, yet short enough not to be annoying under normal circumstances.
- **remotetimeout=**: When used in conjunction with `forcetrigger` it sets a maximum timeout period in seconds for the recovery menu to be displayed before continuing to the boot selection dialog and potentially selecting a default OS to boot. This permits normal default OS booting, yet also allows for a remote user to interrupt the startup process to change the OS to boot, or perform any remote maintenance. Any screen interaction over VNC will cancel the timeout. This additional timeout will lengthen the boot time into a default OS, so choose a value that is long enough to allow VNC access, yet short enough not to be annoying under normal circumstances.

- **networktimeout=**: PINN will wait for a default timeout of 8 seconds to detect whether a network is connected or not. (This is extended by an additional 4 seconds if wifi is configured). This setting allows the network timeout to be specified in seconds, especially for networks that take longer to establish.

- **disablesafemode**: If you have external hardware or an addon board connected to the GPIO header, you may find that pin 5 is being pulled low and accidentally triggering "Safe Mode" by entering the rescueshell. To prevent this, you can append `disablesafemode` to the `recovery.cmdline` file.

Expand Down
5 changes: 5 additions & 0 deletions README_SUM.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ Please note that in some cases it may extract the files into a folder, if this i

## Change History

### V2.8.3

- **Programmable CEC** - Fixed bugs
- **networktimeout** - Added timeout to detect network presence

### V2.8.2

- **Reinstall** - bugfix to Reinstall option following partuuid change on USBs
Expand Down
5 changes: 5 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,3 +382,8 @@ Fixes the incorrect recovery.cmdline bug in v2.5.2.

- **Reinstall** - bugfix to Reinstall option following partuuid change on USBs

### V2.8.3

- **Programmable CEC** - Fixed bugs
- **networktimeout** - Added timeout to detect network presence

5 changes: 5 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ PINN is a version of the NOOBS Operating System Installer for the Raspberry Pi w

## Change History

### V2.8.3

- **Programmable CEC** - Fixed bugs
- **networktimeout** - Added timeout to detect network presence

### V2.8.2

- **Reinstall** - bugfix to Reinstall option following partuuid change on USBs
Expand Down
10 changes: 8 additions & 2 deletions recovery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ MainWindow::MainWindow(const QString &drive, const QString &defaultDisplay, QSpl

QString cmdline = getFileContents("/proc/cmdline");

_networkTimeout=8000;
QStringList args = cmdline.split(QChar(' '),QString::SkipEmptyParts);
foreach (QString s, args)
{
Expand All @@ -204,6 +205,11 @@ MainWindow::MainWindow(const QString &drive, const QString &defaultDisplay, QSpl
installEventFilter(&counter);
counter.startCountdown( params.at(1).toInt() +1);
}
if (s.contains("networktimeout"))
{
QStringList params = s.split(QChar('='));
_networkTimeout = 1000 * params.at(1).toInt();
}
}

ug = new OsGroup(this, ui, !cmdline.contains("no_group"));
Expand Down Expand Up @@ -551,11 +557,11 @@ void MainWindow::populate()

_qpd->installEventFilter(&counter);

int timeout = 8000;
int timeout = _networkTimeout;
if (getFileContents("/settings/wpa_supplicant.conf").contains("ssid="))
{
/* Longer timeout if we have a wifi network configured */
timeout = 12000;
timeout += 4000;
}
QTimer::singleShot(timeout, this, SLOT(hideDialogIfNoNetwork()));
_time.start();
Expand Down
1 change: 1 addition & 0 deletions recovery/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class MainWindow : public QMainWindow
bool _bdisplayUpdate;
QSize _currentsize;
CountdownFilter counter;
int _networkTimeout;

enum ModeTag {
MODE_INSTALL=0,
Expand Down
Loading

0 comments on commit 4a8ca25

Please sign in to comment.