Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filesystems cleanup #74

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lunar-install/lib/filesystems.lunar
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ menu_list_targets()
# this prevents listing EXTENDED partitions
continue
fi
FSIZE=$(nice_size `fdisk -l $DEVICE 2>&1 | grep ^Disk | grep bytes | awk '{print $5}'`)
FSIZE=$(nice_size `fdisk -l $DEVICE 2>&1 | awk '/^Disk.*bytes/ { print $5 }')
echo $DEVICE

PTYPE=$(file -Ls $DEVICE 2>&1 | cat)
Expand Down Expand Up @@ -68,7 +68,6 @@ menu_get_filesystem()
BTRFS="BTree file system (*)"
EXT3="Third Extended file system (*)"
EXT2="Second Extended file system"
REISER="Reiserfs file system (*)"
XFS="XFS file system (*)"
JFS="JFS file system (*)"
VFAT="FAT32 file system"
Expand All @@ -93,8 +92,9 @@ select_swap_file()
if [ -n "$SWAPFILE" ]; then

# strange calc. but it ends up being ~ 2xRAM rounded up to 256MB blocks
SWAPSIZE=$(grep MemTotal: /proc/meminfo | awk '{print $2}' | sed 's/[0-9][0-9][0-9]$//') &&
(( SWAPSIZE = ( ( SWAPSIZE / 128 ) + 1 ) * 256 )) &&
SWAPSIZE=$(awk '/^MemTotal:/ {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update this calculation to match the one in the express disk change :)

print ( int( $2 / 128000 ) + 1) * 256
}' /proc/meminfo)

SWAPSIZE=$(inputbox "$SIZE_PROMPT" "$SWAPSIZE")
if [ -n "$SWAPSIZE" ]; then
Expand Down