From 803568db95a41cfa2ad203d05ec7f4caf1994fdf Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 18 Oct 2015 19:06:39 +0200 Subject: preinit: add support for gl-inet's button to restore factory settings Ideally a more generic reset button name should be used so that we have the same call for various machines (eg: alix, mirabox, ...). --- .preinit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.preinit b/.preinit index 2709ea7..354ddc4 100644 --- a/.preinit +++ b/.preinit @@ -75,6 +75,12 @@ ex /sbin/fix-date ex /sbin/depmod -a ex /bin/sh -c "/bin/mount -n -o remount,ro /boot/ 2>/dev/null" +# pressing the front switch during boot restores factory defaults +ex /sbin/glinet-button +&{ + ex /sbin/restore-factory -f +} + # needed for USB keyboards ex /sbin/bootmodules -- 1.7.12.1