diff options
author | Phil Davis <phil.davis@world.inf.org> | 2013-03-14 00:41:52 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@world.inf.org> | 2013-03-14 00:41:52 +0545 |
commit | 8ad8b0449d8893b486701b7fa1241258d0fd903c (patch) | |
tree | 77820b891e97d4272e6c44bfada6a7bad1a24e07 /etc/rc.embedded | |
parent | 672e373ed44404a76ede8103850242d6829dbcee (diff) | |
download | pfsense-8ad8b0449d8893b486701b7fa1241258d0fd903c.zip pfsense-8ad8b0449d8893b486701b7fa1241258d0fd903c.tar.gz |
Enhance tmp and var size checks
Gets rid of the following console "unexpected operator" messages during boot:
Mounting filesystems...
[: -gt: unexpected operator
[: -gt: unexpected operator
Setting up memory disks... done.
Diffstat (limited to 'etc/rc.embedded')
-rwxr-xr-x | etc/rc.embedded | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/rc.embedded b/etc/rc.embedded index 426495f..b4c60fb 100755 --- a/etc/rc.embedded +++ b/etc/rc.embedded @@ -5,7 +5,7 @@ # Size of /tmp USE_MFS_TMP_SIZE=`/usr/bin/grep use_mfs_tmp_size /cf/conf/config.xml | /usr/bin/cut -f2 -d'>' | /usr/bin/cut -f1 -d'<'` -if [ ${USE_MFS_TMP_SIZE} -gt 0 ]; then +if [ ! -z ${USE_MFS_TMP_SIZE} ] && [ ${USE_MFS_TMP_SIZE} -gt 0 ]; then tmpsize="${USE_MFS_TMP_SIZE}m" else tmpsize="40m" @@ -13,7 +13,7 @@ fi # Size of /var USE_MFS_VAR_SIZE=`/usr/bin/grep use_mfs_var_size /cf/conf/config.xml | /usr/bin/cut -f2 -d'>' | /usr/bin/cut -f1 -d'<'` -if [ ${USE_MFS_VAR_SIZE} -gt 0 ]; then +if [ ! -z ${USE_MFS_VAR_SIZE} ] && [ ${USE_MFS_VAR_SIZE} -gt 0 ]; then varsize="${USE_MFS_VAR_SIZE}m" else varsize="60m" @@ -31,4 +31,4 @@ mdmfs -S -M -s ${varsize} md /var # Ensure vi's recover directory is present /bin/mkdir -p /var/tmp/vi.recover/ -echo " done."
\ No newline at end of file +echo " done." |