Browse Source

remove exec right on systemd first and second run

Émile Morel 9 years ago
parent
commit
2873878f3e
2 changed files with 6 additions and 5 deletions
  1. 3 4
      olinux/create_arm_debootstrap.sh
  2. 3 1
      olinux/create_device.sh

+ 3 - 4
olinux/create_arm_debootstrap.sh

@@ -206,11 +206,10 @@ echo $DEB_HOSTNAME > $TARGET_DIR/etc/hostname
 sed -i "1i127.0.1.1\t${DEB_HOSTNAME}" $TARGET_DIR/etc/hosts
 
 # Add firstrun and secondrun init script
-install -m 755 -o root -g root ${REP}/script/secondrun $TARGET_DIR/usr/local/bin/
-install -m 755 -o root -g root ${REP}/script/firstrun $TARGET_DIR/usr/local/bin/
 install -m 755 -o root -g root ${REP}/script/firstrun $TARGET_DIR/usr/local/bin/
-install -m 544 -o root -g root ${REP}/script/firstrun.service $TARGET_DIR/etc/systemd/system/
-install -m 544 -o root -g root ${REP}/script/secondrun.service $TARGET_DIR/etc/systemd/system/
+install -m 755 -o root -g root ${REP}/script/secondrun $TARGET_DIR/usr/local/bin/
+install -m 444 -o root -g root ${REP}/script/firstrun.service $TARGET_DIR/etc/systemd/system/
+install -m 444 -o root -g root ${REP}/script/secondrun.service $TARGET_DIR/etc/systemd/system/
 chroot_deb $TARGET_DIR "/bin/systemctl daemon-reload >> /dev/null"
 chroot_deb $TARGET_DIR "/bin/systemctl enable firstrun >> /dev/null"
 

+ 3 - 1
olinux/create_device.sh

@@ -149,7 +149,9 @@ fi
 sync
 
 echo "- Write sunxi-with-spl"
-dd if=${UBOOT_FILE} of=${DEVICE} bs=1024 seek=8 >/dev/null 2>&1
+if [[ `file ${DEB_DIR} | grep 'DOS/MBR'` ]] ; then
+  dd if=${UBOOT_FILE} of=${DEVICE} bs=1024 seek=8 >/dev/null 2>&1
+fi	  
 sync
 
 if [ "${DEVICE}" = "img" ] ; then