Skip to content

Commit

Permalink
Refactoring of common code between the SYSV init and initramfs scripts.
Browse files Browse the repository at this point in the history
* Move code from the SYSV init and initramfs scripts that is better served
  in a common code base library (zfs-functions).
* Use "${VAR}" instead of "$VAR".
* Add some comments to functions that didn't have any.
* Create zfs_run_cmd() which records stderr, exit code etc.
* zfs_set_ifs() needs to be a global func. Use this in zfs_run_cmd()
  before we run the actual command.
* Dracut have the func emergency_shell() which does a little more.
  For those that don't have it, just run '/bin/sh -i -l'.
* Minor fix/change to read_mtab():
  * Strip control characters (space - \040) from /proc/mounts GLOBALY,
    not just first occurrence.
  * Don't replace unprintable characters ([/-. ]) for use in the variable
    name with underscore. No need, just remove them all together.
* Move code snippet that fetches and mounts recursive filesystems into
  the new recursive_mount_filesystems() function.
* Instead of using ZFS_CMD+zfs_action()+zfs_log_failure_msg() etc
  each and every time, use the more generic zfs_action() that does
  most of this for us.
* Put the check for zfs debugging in check_zfs_debug(). Use this in
  zfs_action() to check if we should output the message we're called
  with.
  • Loading branch information
FransUrbo committed Aug 2, 2015
1 parent 6c11adf commit e0d40dc
Show file tree
Hide file tree
Showing 5 changed files with 726 additions and 818 deletions.
Loading

0 comments on commit e0d40dc

Please sign in to comment.