On 03/04/14 at 10:14am, Vivek Goyal wrote:
On Mon, Mar 03, 2014 at 06:37:16PM +0800, Baoquan He wrote:
> --- a/mkdumprd
> +++ b/mkdumprd
> @@ -355,6 +355,27 @@ get_block_dump_target()
> [ -b "$_target" ] && echo $(to_dev_name $_target)
> }
>
Put a comment here. Something like.
# If no dump disk is specified make sure /var/crash is not mounted on a
# separate disk.
Adding comments makes it better, will do in new post.
> +check_block_dump_target()
> +{
> + local _target
> + local _mntpoint
> +
> + _target=$(get_user_configured_dump_disk)
> + [ -n "$_target" ] && echo $(to_dev_name $_target) &&
return
Why do we need to do "echo $(to_dev_name $_target)"? Shouldn't it just
be.
[ -n "$_target" ] && return
Yes, it is. Will change.
> +
> + _target=$(get_root_fs_device)
> + if [ -b "$_target" ]; then
> + mkdir -p $SAVE_PATH
> + _mntpoint=`df $SAVE_PATH | tail -1 | awk '{print $NF}'`
> + _target=`df $SAVE_PATH | tail -1 | awk '{print $1}'`
What's the use of getting "_target" now? Looks like it is not being used?
Yeah, originally I want to notice user who is mounted on the SAVE_PATH.
Now it's not needed. Will remove it.
Thanks for your suggestion.
Baoquan
Thanks
Thanks
Vivek