Skip to content

Instantly share code, notes, and snippets.

@jvalleroy
jvalleroy / gist:edb47e6930a62969e1add1a8b251ccff
Created July 21, 2017 22:41
Plinth 500 error: database is locked
[2017-07-21 10:55:11,934] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/packages', 'is-package-manager-busy']
[2017-07-21 10:55:16,844] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/packages', 'is-package-manager-busy']
[2017-07-21 10:55:21,774] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/packages', 'is-package-manager-busy']
[2017-07-21 10:55:27,943] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/packages', 'is-package-manager-busy']
[2017-07-21 10:55:32,857] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/packages', 'is-package-manager-busy']
[2017-07-21 10:55:37,947] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/packages', 'is-package-manager-busy']
[2017-07-21 10:55:43,082] plinth.actions INFO Executing command - ['sudo', '-n', '/usr/share/plinth/actions/packages', '
@jvalleroy
jvalleroy / gist:e034213c783ac7688d62
Created May 15, 2014 20:46
f-m git-diff-nickdaly-master
diff --git a/Makefile b/Makefile
index 24d2d9a..a12cd41 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,6 @@ ARCHIVE = $(NAME).tar.bz2
SIGNATURE = $(ARCHIVE).sig
SUITE = sid
SOURCE = false
-OWNER = 1000
@jvalleroy
jvalleroy / gist:11284178
Created April 25, 2014 09:57
BBB armmp u-boot logs (CONFIG_TI_EDMA and initramfs)
U-Boot SPL 2014.01 (Mar 05 2014 - 01:10:53)
reading args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
U-Boot 2014.01 (Mar 05 2014 - 01:06:07)
I2C: ready
@jvalleroy
jvalleroy / gist:11284125
Created April 25, 2014 09:55
Remaining config diffs between BBB and armmp kernel
3c3
< # Linux/arm 3.13.7 Kernel Configuration
---
> # Linux/arm 3.14.0 Kernel Configuration
6d5
< CONFIG_MIGHT_HAVE_PCI=y
9d7
< CONFIG_NO_IOPORT=y
18d15
< CONFIG_ZONE_DMA=y
U-Boot SPL 2014.01 (Mar 05 2014 - 01:10:53)
reading args
spl: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
U-Boot 2014.01 (Mar 05 2014 - 01:06:07)
I2C: ready
@jvalleroy
jvalleroy / gist:7441756
Created November 13, 2013 01:01
Step-through of password hashing code in Plinth using passlib's bcrypt.
https://github.com/NickDaly/Plinth/pull/52/files
Storing the password (add_user function in modules/installed/lib/auth.py):
>>> passphrase = "secretpassword"
>>> pass_hash = bcrypt.encrypt(passphrase)
>>> pass_hash
'$2a$12$cGf.hqxlyfTJk7HtyhAtDu48gazW1W8rJZt9choiP9/7Rff18yQeW'
# 2a is the identifying prefix
@jvalleroy
jvalleroy / gist:7273729
Created November 1, 2013 23:52
[fbx] Dreamplug ethernet ports are assigned randomly at boot as eth0 and eth1
### These are annotations that I added.
### My setup is: Top ethernet port is disconnected. Bottom port is connected to router.
### /etc/network/interfaces assigns eth0 to 192.168.1.1, and uses dhcp for eth1.
### So I am hoping that eth1 will be assigned an address by my router. This means that I want the connected port to be interface eth1, not eth0.
##################################################
### First boot - I didn't see any logs related to the network interfaces.
@jvalleroy
jvalleroy / gist:7243082
Created October 31, 2013 01:23
Get Plinth HTTPS to function correctly with jwchat site enabled.
diff --git a/apache2/sites-available/jwchat.conf b/apache2/sites-available/jwchat.conf
index d67df9c..4fb38d2 100644
--- a/apache2/sites-available/jwchat.conf
+++ b/apache2/sites-available/jwchat.conf
@@ -10,5 +10,11 @@
<Proxy *>
Allow from all
</Proxy>
+
+ ## Force SSL for Plinth
@jvalleroy
jvalleroy / gist:7188012
Created October 27, 2013 21:20
Errors while building dreamplug image.
running /usr/lib/freedombox/setup.d/95_dreamplug-kernel
gzip: /boot/ is a directory -- ignored
/bin/cpio: premature end of archive
/usr/lib/freedombox/setup.d/95_dreamplug-kernel: 16: /usr/lib/freedombox/setup.d/95_dreamplug-kernel: cannot create /boot/: Is a directory
/bin/cp: cannot stat '/usr/lib//kirkwood-dreamplug.dtb': No such file or directory
/bin/cat: dtb: No such file or directory
/usr/lib/freedombox/setup.d/95_dreamplug-kernel: 20: /usr/lib/freedombox/setup.d/95_dreamplug-kernel: mkimage: not found
/usr/lib/freedombox/setup.d/95_dreamplug-kernel: 20: /usr/lib/freedombox/setup.d/95_dreamplug-kernel: mkimage: not found