Browse Source

Improced Code

old-stable
gau1991 10 years ago
parent
commit
39e07b1012
  1. 6
      src/lib/ee_lib_create_swap.sh

6
src/lib/ee_lib_create_swap.sh

@ -6,15 +6,15 @@ function ee_lib_create_swap()
# Swap Parameters: # Swap Parameters:
# Location: /swapfile # Location: /swapfile
# Block Size: 1024 # Block Size: 1024
dd if=/dev/zero of=/swapfile bs=1024 count=1024k \ dd if=/dev/zero of=/swapfile bs=1024 count=1024k &>> $EE_COMMAND_LOG \
|| ee_lib_error "Unable to generate /swapfile, exit status = " $? || ee_lib_error "Unable to generate /swapfile, exit status = " $?
# Create it as a Swap # Create it as a Swap
mkswap /swapfile \ mkswap /swapfile &>> $EE_COMMAND_LOG \
|| ee_lib_error "Unable to create swapfile, exit status = " $? || ee_lib_error "Unable to create swapfile, exit status = " $?
# On the Swap # On the Swap
swapon /swapfile \ swapon /swapfile &>> $EE_COMMAND_LOG \
|| ee_lib_error "Unable to on Swap, exit status = " $? || ee_lib_error "Unable to on Swap, exit status = " $?
# Add entry into /etc/fstab # Add entry into /etc/fstab

Loading…
Cancel
Save