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
containers: | |
printer: | |
setup: | |
- !Ubuntu trusty | |
- !Sh "dpkg --add-architecture i386" | |
- !Install ["libc6:i386", "cups-client"] | |
- !EnsureDir "/usr/share/cups/model" | |
- !Sh "dpkg -i brdcp7030lpr-2.0.2-1.i386.deb" | |
- !Sh "dpkg -i cupswrapperDCP7030-2.0.2-1.i386.deb" |
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
commands: | |
wrapper: !Command | |
container: printer | |
run: ["/usr/lib/cups/filter/brlpdwrapperDCP7030"] |
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
sudo mkdir /var/lib/printer | |
sudo cp vagga.yaml .vagga /var/lib/printer | |
cd ~/dev/vagga | |
sudo PREFIX=/var/lib/printer ./install.sh | |
cd /var/lib/printer | |
sudo chown -R cups:lp . |
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
sudo mkdir /var/lib/printer | |
sudo cp vagga.yaml .vagga /var/lib/printer | |
cd ~/dev/vagga | |
sudo PREFIX=/var/lib/printer ./install.sh | |
cd /var/lib/printer | |
sudo chown -R cups:lp . |
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
printer: | |
uids: [0] | |
gids: [0] | |
setup: | |
... |
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
{pkgs, stdenv}: | |
pkgs.writeTextFile { | |
name = "brlpdwrapperDCP7030"; | |
destination = "/lib/cups/filter/brlpdwrapperDCP7030"; | |
executable = true; | |
text = '' | |
#!/bin/sh | |
cd /var/lib/printer | |
export PATH=$PATH:/var/setuid-wrappers |
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
{pkgs, stdenv}: | |
pkgs.writeTextFile { | |
name = "brlpdwrapperDCP7030"; | |
destination = "/lib/cups/filter/brlpdwrapperDCP7030"; | |
executable = true; | |
text = '' | |
#!/bin/sh | |
cd /var/lib/printer | |
export PATH=$PATH:/var/setuid-wrappers |
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
setup: | |
- !Ubuntu trusty | |
- !UbuntuUniverse # needed for a2ps | |
- !Sh "dpkg --add-architecture i386" | |
- !Install ["libc6:i386", "cups-client"] | |
- !Install ["ghostscript", "a2ps"] | |
- !EnsureDir "/usr/share/cups/model" | |
- !Sh "dpkg -i brdcp7030lpr-2.0.2-1.i386.deb" | |
- !Sh "dpkg -i cupswrapperDCP7030-2.0.2-1.i386.deb" |
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
loop { | |
let mut buf = new_buffer(); | |
try!(read_request(&mut buf)); | |
let parsed = try!(parse_request(&buf)); | |
let value = try!(process_request(&parsed)); | |
try!(send_response(&value)); | |
} |
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
enum FSM { | |
Reading(Buf), | |
Processing(Parsed), | |
Sending(OutBuf), | |
Idle, | |
} |