-
-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[script] add components to bump to v0.1.5
v0.1.5 has several exciting changes - Add dumb-suid as a wrapper for suid bash scripts - Fix pulseaudio - Add splash screen - Fix several problems with read-only-fs
- Loading branch information
Showing
13 changed files
with
127 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
sleep 3 | ||
shutdown -h now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
echo 1 > /sys/class/backlight/rpi_backlight/bl_power | ||
vcgencmd display_power 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
vcgencmd display_power 1 | ||
echo 0 > /sys/class/backlight/rpi_backlight/bl_power |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
|
||
default-fragments = 2 | ||
default-fragment-size-msec = 5 | ||
deferred-volume-safety-margin-usec = 1 | ||
; flat-volumes = no | ||
realtime-scheduling = no | ||
default-sample-rate = 48000 | ||
resample-method = speex-fixed-1 | ||
default-fragments = 10 | ||
default-fragment-size-msec = 10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description=Splash screen | ||
DefaultDependencies=no | ||
After=local-fs.target | ||
|
||
[Service] | ||
ExecStart=/usr/bin/fbi -d /dev/fb0 --noverbose -a /opt/crankshaft/splash.png | ||
StandardInput=tty | ||
StandardOutput=tty | ||
|
||
[Install] | ||
WantedBy=sysinit.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CC=gcc | ||
CFLAGS=-I. -O3 | ||
PROG=dumb_suid | ||
|
||
all: $(PROG) | ||
|
||
$(PROG): $(PROG).c | ||
$(CC) $(CFLAGS) -o $(PROG) $(PROG).c | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm $(PROG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <sys/types.h> | ||
#include <unistd.h> | ||
#include <string.h> | ||
|
||
// HACK: Will fix later | ||
// | ||
// This program is a wrapper to suid scripts in /opt/crankshaft | ||
// Because we can't suid the bash scripts | ||
// | ||
// This is probably a dumb and dangerous idea but it works for now | ||
|
||
int main( int argc, char **argv ) | ||
{ | ||
setuid( 0 ); | ||
char scriptname[50]; | ||
strcpy (scriptname, "/opt/crankshaft/"); | ||
strncat(scriptname, argv[1], 50); | ||
printf("Executing '%s' with suid 0!\n", scriptname); | ||
system( scriptname ); | ||
|
||
return 0; | ||
} |