lunar.install changes suggestion

Auke Kok sofar at lunar-linux.org
Wed May 12 14:45:00 GMT 2004


Here's some changes I propose to the ISO installer. those of you working 
on the ISO please take them into consideration:

- jfs is also journalling (cosmetic)

- use -t ext3 instead of -t ext2 -j... I found this quite confusing 
especially if i'm entering through the installer. -t ext3 does exactly 
what is says and is shorter and clearer.

- create the tree/dir up to the wanted swapfile, I like to put it in 
/var instead of /. that fails because if var isn't there... etc

- add fsck passno's to other filesystems too!!!

- don't use "defaults" if we're not using defaults.

- cosmetics in the menu

sofar





Index: lunar.install
===================================================================
RCS file: /var/cvs/lunar/brutus/iso/usr/sbin/lunar.install,v
retrieving revision 1.17
diff -u -r1.17 lunar.install
--- lunar.install       2 Apr 2004 15:39:22 -0000       1.17
+++ lunar.install       12 May 2004 12:45:47 -0000
@@ -263,7 +263,7 @@
    HELP="Please select a filesystem"
    EXT2="Second Extended             file system"
    EXT3="Second Extended  journaling file system"
-     JFS="JFS                         file system"
+     JFS="JFS              journaling file system"
  REISER="Reiserfs         journaling file system"
     XFS="XFS              journaling file system"
    SWAP="Swap Partition"
@@ -391,10 +391,10 @@
# the separators below are tabs, not spaces!!
  case  $1  in
    ext2)  echo  "-t   ext2" ;;
-    ext3)  echo  "-t   ext2" ;;
+    ext3)  echo  "-t   ext3" ;;
     jfs)  echo  "-t   jfs"  ;;
     xfs)  echo  "-t   xfs"  ;;
-       *)  true              ;;
+       *)  true               ;;
  esac

}
@@ -404,7 +404,6 @@

# the separators below are tabs, not spaces!!
  case  $1  in
-    ext3)  echo  "-j"                 ;;
     xfs)  echo  "-l   size="$XFS_LOG_SIZE"b   -f"  ;;
       *)  true                       ;;
  esac
@@ -427,6 +426,10 @@

  if  confirm  "$PROMPT";  then

+    if [ ! -d "$(dirname $SWAPFILE)" ] ; then
+        mkdir -p "$(dirname $SWAPFILE)"
+    fi
+
    if  dd  of=$SWAPFILE  if=$ZERO bs=1M count=$SIZE  &&
        mkswap      $SWAPFILE                         &&
        chmod  000  $SWAPFILE
@@ -527,18 +530,19 @@

determine_fstab_settings()  {

-  LAST="0 0"
+  case  $POINT  in
+           /)  LAST="0 1"                  ;;
+           *)  LAST="0 2"                  ;;
+  esac
+
  case  $FSYS  in
-        swap)  OPTIONS="defaults"                        ;;
-         jfs)  OPTIONS="defaults"                        ;;
-    reiserfs)  OPTIONS="defaults,notail,noatime"         ;;
-        ext3)  OPTIONS="defaults,noatime"                ;;
-         xfs)  
OPTIONS="defaults,noatime"                                              ;;
-        ext2)  OPTIONS="defaults,noatime"
-               case  $POINT  in
-                 /)  LAST="0 1"                          ;;
-               case  $POINT  in
-                 /)  LAST="0 1"                          ;;
-                 *)  LAST="0 2"                          ;;
-               esac
+        swap)  OPTIONS="sw"
+              LAST="0 0"                ;;
+         jfs)  OPTIONS="defaults"        ;;
+    reiserfs)  OPTIONS="notail,noatime"  ;;
+        ext3)  OPTIONS="noatime"         ;;
+         xfs)  OPTIONS="noatime"        ;;
+        ext2)  OPTIONS="noatime"         ;;
               ;;
  esac
}
@@ -1200,9 +1204,9 @@
                         "I"  "Configure Linux Kernel"  "$I_HELP"  \
                         "J"  "Reconfigure LILO"        "$J_HELP"  \
                         "K"  "Install Linux MBR"       "$K_HELP"  \
-                         "Q"  "Hostname Setting"        "$Q_HELP"  \
+                         "Q"  "Set hostname"            "$Q_HELP"  \
                         "L"  "Configure Networking"    "$L_HELP"  \
-                         "S"  "SSH Server Keys"         "$S_HELP"  \
+                         "S"  "Create SSH Server Keys"  "$S_HELP"  \
                         "M"  "Done"                    "$M_HELP"  \
                         "N"  "Shell"                   "$N_HELP"  \
                         "O"  "Enable Guided Menu"      "$O_HELP"  \
@@ -1226,9 +1230,9 @@
                         "G"  "Select Timezone"         "$G_HELP"  \
                         "H"  "Architecture Optimize"   "$H_HELP"  \
                         "I"  "Configure Linux Kernel"  "$I_HELP"  \
-                         "Q"  "Hostname Setting"        "$Q_HELP"  \
+                         "Q"  "Set hostname"            "$Q_HELP"  \
                         "L"  "Configure Networking"    "$L_HELP"  \
-                         "S"  "SSH Server Keys"         "$S_HELP"  \
+                         "S"  "Create SSH Server Keys"  "$S_HELP"  \
                         "M"  "Done"                    "$M_HELP"  \
                         "N"  "Shell"                   "$N_HELP"  \
                         "O"  "Enable Guided Menu"      "$O_HELP"  \
@@ -1297,9 +1301,9 @@
                         "$Z_HELP"                                     \
                         0 0 0                                         \
                "I"  "Optional  Re-Configure Linux Kernel"  "$I_HELP"  \
-                "Q"  "Hostname Setting"                     "$Q_HELP"  \
+                "Q"  "Set hostname"                         "$Q_HELP"  \
                "L"  "Configure Networking"                 "$L_HELP"  \
-                "S"  "SSH Server Keys"                      "$S_HELP"  \
+                "S"  "Create SSH Server Keys"               "$S_HELP"  \
                "M"  "Done"                                 "$M_HELP"  \
                "N"  "Shell"                                "$N_HELP"  \
                "O"  "Disable Guided Menu"                  "$O_HELP"`
@@ -1314,9 +1318,9 @@
                "I"  "Optional  Re-Configure Linux Kernel"  "$I_HELP"  \
                "J"  "Optional  Reconfigure LILO"           "$J_HELP"  \
                "K"  "Optional  Install Linux MBR"          "$K_HELP"  \
-                "Q"  "Hostname Setting"                     "$Q_HELP"  \
+                "Q"  "Set hostname"                         "$Q_HELP"  \
                "L"  "Configure Networking"                 "$L_HELP"  \
-                "S"  "SSH Server Keys"                      "$S_HELP"  \
+                "S"  "Create SSH Server Keys"               "$S_HELP"  \
                "M"  "Done"                                 "$M_HELP"  \
                "N"  "Shell"                                "$N_HELP"  \
                "O"  "Disable Guided Menu"                  "$O_HELP"`

-------------- next part --------------
Index: lunar.install
===================================================================
RCS file: /var/cvs/lunar/brutus/iso/usr/sbin/lunar.install,v
retrieving revision 1.17
diff -u -r1.17 lunar.install
--- lunar.install	2 Apr 2004 15:39:22 -0000	1.17
+++ lunar.install	12 May 2004 12:45:47 -0000
@@ -263,7 +263,7 @@
     HELP="Please select a filesystem"
     EXT2="Second Extended             file system"
     EXT3="Second Extended  journaling file system"
-     JFS="JFS                         file system"
+     JFS="JFS              journaling file system"
   REISER="Reiserfs         journaling file system"
      XFS="XFS              journaling file system"
     SWAP="Swap Partition"
@@ -391,10 +391,10 @@
 # the separators below are tabs, not spaces!!
   case  $1  in
     ext2)  echo  "-t	ext2" ;;
-    ext3)  echo  "-t	ext2" ;;
+    ext3)  echo  "-t	ext3" ;;
      jfs)  echo  "-t	jfs"  ;;
      xfs)  echo  "-t	xfs"  ;;
-       *)  true              ;;
+       *)  true               ;;
   esac
 
 }
@@ -404,7 +404,6 @@
 
 # the separators below are tabs, not spaces!!
   case  $1  in
-    ext3)  echo  "-j"                 ;;
      xfs)  echo  "-l	size="$XFS_LOG_SIZE"b	-f"  ;;
        *)  true                       ;;
   esac
@@ -427,6 +426,10 @@
 
   if  confirm  "$PROMPT";  then
 
+    if [ ! -d "$(dirname $SWAPFILE)" ] ; then
+        mkdir -p "$(dirname $SWAPFILE)"
+    fi
+
     if  dd  of=$SWAPFILE  if=$ZERO bs=1M count=$SIZE  &&
         mkswap      $SWAPFILE                         &&
         chmod  000  $SWAPFILE
@@ -527,18 +530,19 @@
 
 determine_fstab_settings()  {
 
-  LAST="0 0"
+  case  $POINT  in
+           /)  LAST="0 1"                  ;;
+           *)  LAST="0 2"                  ;;
+  esac
+
   case  $FSYS  in
-        swap)  OPTIONS="defaults"                        ;;
-         jfs)  OPTIONS="defaults"                        ;;
-    reiserfs)  OPTIONS="defaults,notail,noatime"         ;;
-        ext3)  OPTIONS="defaults,noatime"                ;;
-         xfs)  OPTIONS="defaults,noatime"						;;
-        ext2)  OPTIONS="defaults,noatime"
-               case  $POINT  in
-                 /)  LAST="0 1"                          ;;
-                 *)  LAST="0 2"                          ;;
-               esac
+        swap)  OPTIONS="sw"
+	       LAST="0 0"                ;;
+         jfs)  OPTIONS="defaults"        ;;
+    reiserfs)  OPTIONS="notail,noatime"  ;;
+        ext3)  OPTIONS="noatime"         ;;
+         xfs)  OPTIONS="noatime"	 ;;
+        ext2)  OPTIONS="noatime"         ;;
                ;;
   esac
 }
@@ -1200,9 +1204,9 @@
                          "I"  "Configure Linux Kernel"  "$I_HELP"  \
                          "J"  "Reconfigure LILO"        "$J_HELP"  \
                          "K"  "Install Linux MBR"       "$K_HELP"  \
-                         "Q"  "Hostname Setting"        "$Q_HELP"  \
+                         "Q"  "Set hostname"            "$Q_HELP"  \
                          "L"  "Configure Networking"    "$L_HELP"  \
-                         "S"  "SSH Server Keys"         "$S_HELP"  \
+                         "S"  "Create SSH Server Keys"  "$S_HELP"  \
                          "M"  "Done"                    "$M_HELP"  \
                          "N"  "Shell"                   "$N_HELP"  \
                          "O"  "Enable Guided Menu"      "$O_HELP"  \
@@ -1226,9 +1230,9 @@
                          "G"  "Select Timezone"         "$G_HELP"  \
                          "H"  "Architecture Optimize"   "$H_HELP"  \
                          "I"  "Configure Linux Kernel"  "$I_HELP"  \
-                         "Q"  "Hostname Setting"        "$Q_HELP"  \
+                         "Q"  "Set hostname"            "$Q_HELP"  \
                          "L"  "Configure Networking"    "$L_HELP"  \
-                         "S"  "SSH Server Keys"         "$S_HELP"  \
+                         "S"  "Create SSH Server Keys"  "$S_HELP"  \
                          "M"  "Done"                    "$M_HELP"  \
                          "N"  "Shell"                   "$N_HELP"  \
                          "O"  "Enable Guided Menu"      "$O_HELP"  \
@@ -1297,9 +1301,9 @@
                          "$Z_HELP"                                     \
                          0 0 0                                         \
                 "I"  "Optional  Re-Configure Linux Kernel"  "$I_HELP"  \
-                "Q"  "Hostname Setting"                     "$Q_HELP"  \
+                "Q"  "Set hostname"                         "$Q_HELP"  \
                 "L"  "Configure Networking"                 "$L_HELP"  \
-                "S"  "SSH Server Keys"                      "$S_HELP"  \
+                "S"  "Create SSH Server Keys"               "$S_HELP"  \
                 "M"  "Done"                                 "$M_HELP"  \
                 "N"  "Shell"                                "$N_HELP"  \
                 "O"  "Disable Guided Menu"                  "$O_HELP"`
@@ -1314,9 +1318,9 @@
                 "I"  "Optional  Re-Configure Linux Kernel"  "$I_HELP"  \
                 "J"  "Optional  Reconfigure LILO"           "$J_HELP"  \
                 "K"  "Optional  Install Linux MBR"          "$K_HELP"  \
-                "Q"  "Hostname Setting"                     "$Q_HELP"  \
+                "Q"  "Set hostname"                         "$Q_HELP"  \
                 "L"  "Configure Networking"                 "$L_HELP"  \
-                "S"  "SSH Server Keys"                      "$S_HELP"  \
+                "S"  "Create SSH Server Keys"               "$S_HELP"  \
                 "M"  "Done"                                 "$M_HELP"  \
                 "N"  "Shell"                                "$N_HELP"  \
                 "O"  "Disable Guided Menu"                  "$O_HELP"`


More information about the Lunar-dev mailing list