I'm using wheezy. GNU sed version 4.2.1. I see what's happening now. It looks like the uEnv.txt doesn't have quotes around the kernel version at all, so there shouldn't be any inner quotes. The only reason my kernel "update" worked was because the kernel version was the same, so the sed didn't need to catch a match and update the uname_r.
It looks like single or double outer quotes work fine. Alex On 9/23/2014 9:56 AM, Robert Nelson wrote: > On Tue, Sep 23, 2014 at 8:50 AM, Robert Nelson <[email protected]> > wrote: >> On Tue, Sep 23, 2014 at 5:56 AM, Alexander Hayman >> <[email protected]> wrote: >>> Hmm, this didn't fix the problem. >>> >>> Preparing to replace linux-image-3.8.13-bone66 1cross (using >>> linux-image-3.8.13-bone66_1cross_armhf.deb) ... >>> Unpacking replacement linux-image-3.8.13-bone66 ... >>> Setting up linux-image-3.8.13-bone66 (1cross) ... >>> update-initramfs: Generating /boot/initrd.img-3.8.13-bone66 >>> zz-uenv_txt: Updating /boot/uEnv.txt [uname_r=3.8.13-bone66] >>> sed: -e expression #1, char 24: unterminated `s' command >>> run-parts: /etc/kernel/postinst.d/zz-uenv_txt exited with return code 1 >>> dpkg: error processing linux-image-3.8.13-bone66 (--install): >>> subprocess installed post-installation script returned error exit status 1 >>> Errors were encountered while processing: >>> linux-image-3.8.13-bone66 >>> >>> However, a colleague found this solution, which works fine: >>> sed -i -e >>> 's:uname_r='"'"'${older_kernel}'"'"':uname_r='"'"'${version}'"'"':g' >>> /boot/uEnv.txt >> That is odd, we shouldn't have to be that crazy, what distro is that >> rootfs based on and what version of sed? > This works on wheezy: > > sed -i -e "s:uname_r=$older_kernel:uname_r=$version:g" /boot/uEnv.txt > > Selecting previously unselected package linux-image-3.14.19-ti-r25. > (Reading database ... 23055 files and directories currently installed.) > Unpacking linux-image-3.14.19-ti-r25 (from > .../linux-image-3.14.19-ti-r25_1wheezy_armhf.deb) ... > Setting up linux-image-3.14.19-ti-r25 (1wheezy) ... > update-initramfs: Generating /boot/initrd.img-3.14.19-ti-r25 > zz-uenv_txt: Updating /boot/uEnv.txt [uname_r=3.14.19-ti-r25] > > > Just remove the middle quotes all together.. > > I'll fire up jessie/trusty/utopic and make sure it works there too. > > > Regards, > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
