Browse Source

change conditions

Émile Morel 9 years ago
parent
commit
e564b58c52
1 changed files with 3 additions and 3 deletions
  1. 3 3
      olinux/create_arm_debootstrap.sh

+ 3 - 3
olinux/create_arm_debootstrap.sh

@@ -129,7 +129,7 @@ fi
 chroot_deb $TARGET_DIR 'apt-get update'
 
 
-if [ -n $ENCRYPT ] ; then
+if [ $ENCRYPT ] ; then
   PACKAGES=$PACKAGES" dropbear busybox cryptsetup "
 fi
 
@@ -243,7 +243,7 @@ EOT
     chroot_deb $TARGET_DIR 'apt-get upgrade -y --force-yes'
     mkdir $TARGET_DIR/etc/flash-kernel
     echo $FLASH_KERNEL > $TARGET_DIR/etc/flash-kernel/machine
-    if [ -n $ENCRYPT ] ; then
+    if [ $ENCRYPT ] ; then
       PACKAGES="stunnel dropbear busybox"
       echo 'LINUX_KERNEL_CMDLINE="console=tty0 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p60 root=/dev/mapper/root cryptopts=target=root,source=/dev/mmcblk0p2,cipher=aes-xts-plain64,size=256,hash=sha1 rootwait sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=0 panic=10 loglevel=6 consoleblank=0"' > $TARGET_DIR/etc/default/flash-kernel
       echo 'aes' >> $TARGET_DIR/etc/initramfs-tools/modules
@@ -261,7 +261,7 @@ EOT
       echo 'LINUX_KERNEL_CMDLINE="console=tty0 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p60 root=/dev/mmcblk0p1 rootwait sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=0 panic=10 loglevel=6 consoleblank=0"' > $TARGET_DIR/etc/default/flash-kernel
     fi
     chroot_deb $TARGET_DIR "DEBIAN_FRONTEND=noninteractive $APT linux-image-armmp flash-kernel u-boot-sunxi u-boot-tools $PACKAGES"
-    if [ -n $ENCRYPT ] ; then
+    if [ $ENCRYPT ] ; then
       echo 'root	/dev/mmcblk0p2	none	luks' >> $TARGET_DIR/etc/crypttab
       echo '/dev/mapper/root	/	ext4	defaults	0	1' > $TARGET_DIR/etc/fstab
       echo '/dev/mmcblk0p1	/boot	ext4	defaults	0	2' >> $TARGET_DIR/etc/fstab