Go to advanced search

by chito
Fri May 19, 2017 2:39 pm
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

i can tell this is going to be one of those annoying problems that is going to be a pain to sort out retyped the line, didnt work the tried the following two lines and they both didnt work sudo sed -i -e '/^dtparam=audio/ s/^/#/' /boot/config.txt sudo sed -i -e '/^#dtparam=audio/a dtparam=hifiberry-...
by chito
Fri May 19, 2017 2:08 pm
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

this is the entire content of my script

Code: Select all

sudo sed -i -e '/^dtparam=audio/ s/^/#/' -e '/^#dtparam=audio/a dtparam=hifiberry-dacplus' /boot/config.txt

cat <<EOF >/etc/asound.conf
pcm.!default{
	type hw card 0
}
ctl.!default {
	type hw card 0
}
EOF
by chito
Fri May 19, 2017 1:59 pm
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

Yep sorry my oversight, so i added the file sudo sed -i -e '/^dtparam=audio/ s/^/#/' -e '/^#dtparam=audio/a dtparam=hifiberry-dacplus' /boot/config.txt and the error is weird : No such file or directoryg.txt : not founder.sh: 3: ./mysetup.sh: no such directoryg.txt... whats directoryg.txt? something...
by chito
Fri May 19, 2017 1:37 pm
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

I get the following error now

Code: Select all

sed: no input files
: not founder.sh: 3: ./mysetup.sh:
by chito
Fri May 19, 2017 12:59 pm
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

Ok so i tried it for the first time. created the a script called mysetup.sh sudo sed -i -e '/^dtparam=audio/ {s/^/# /; a dtparam=hifiberry-dacplus}' /boot/config.txt cat <<EOF >/etc/asound.conf pcm.!default { type hw card 0 } ctl.!default { type hw card 0 } EOF I made it executable with sudo chmod 0...
by chito
Thu May 18, 2017 1:51 am
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

so what happens when the code to create a new file tries to create it and there's already a file with that name? will it replace it? if that makes things easier. if not the instructions from hifiberry are to delete it and create a new one sudo tee /etc/asound.conf << EOF >/dev/null pcm.!default { ty...
by chito
Wed May 17, 2017 10:47 pm
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

thanks heaps that looks really really useful.

i have a few things i need to do to setup an image and the Hifiberry setup was a good starting point as it needs find and replace settings and creat a new file. 2 of the things i need to do alot
by chito
Wed May 17, 2017 10:42 am
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

thanks heaps!!!
this is exactly what i needed. with this i think i can make the other changes i need. its certainly heaps to go on.

really appreciate the help
by chito
Wed May 17, 2017 6:21 am
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

Re: creating scripts to automate setup of new images

awesome! thanks heaps for your help. this is great. ill start experimenting with this tonight! I read about sed (dont really know what it is) but I wasn't sure that would work with the pi. I read somewhere that shell scripts werent meant to edit files or something like that. is sed another language?...
by chito
Mon May 15, 2017 3:25 am
Forum: Beginners
Topic: creating scripts to automate setup of new images
Replies: 21
Views: 2162

creating scripts to automate setup of new images

Hi I've been playing around with a few images trying to work out which one is right for me. One issue that this has created is having to manually make changes to files each time. So I want to create a script that will make these changes for me. for example, Im using HIfiBerry DAC which requires that...
by chito
Thu May 11, 2017 5:19 am
Forum: Beginners
Topic: ipad 3/4 screen with controller board for raspberry pi
Replies: 0
Views: 373

ipad 3/4 screen with controller board for raspberry pi

m looking for a 1080p IPS screen for a project I'm making. the smallest I can find is 11.6 inch. which is just too big by about 1cm! sucks big time... so I'm thinking I've seen people use replacement iPad 2 screens (1024 x 768) with a 3rd party HDMI controller board with RPis which the Pi can handle...

Go to advanced search