Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2009 10:57:15 GMT
From:      Anselm Strauss <amsibamsi@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/141187: freebsd-snapshot does not check /etc/rc.conf.d
Message-ID:  <200912051057.nB5AvFkN091422@www.freebsd.org>
Resent-Message-ID: <200912051100.nB5B03vf093362@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         141187
>Category:       ports
>Synopsis:       freebsd-snapshot does not check /etc/rc.conf.d
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 05 11:00:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anselm Strauss
>Release:        8.0
>Organization:
-
>Environment:
FreeBSD hulk.l.ttyv0.net 8.0-RELEASE FreeBSD 8.0-RELEASE #1: Fri Dec  4 00:20:25 CET 2009     root@hulk.l.ttyv0.net:/usr/obj/usr/src/sys/CUSTOM  amd64
>Description:
Port: freebsd-snapshot

The snapshot command checks whether zfs is enabled on a system. It does so by looking only at /etc/rc.conf. If zfs is configured in /etc/rc.conf.d/zfs, the snapshot command does not know about it, and behaves as zfs was disabled. Consequently snapshots of zfs filesystems can not be managed with the command, although zfs is enabled and running.
>How-To-Repeat:
Assuming you have zfs_enable="YES" in /etc/rc.conf and "snapshot list" shows zfs snapshots: move the zfs_enable setting to /etc/rc.conf.d/zfs and run "snapshot list" again. No zfs snapshots will show up any more.
>Fix:
The snapshot command should also source zfs config with "load_rc_config zfs".

Patch attached with submission follows:

*** snapshot.orig       Fri Dec  4 19:24:06 2009
--- snapshot    Sat Dec  5 10:54:53 2009
***************
*** 81,86 ****
--- 81,87 ----
          source_rc_confs; \
      fi; \
      . /etc/rc.subr; \
+     load_rc_config zfs; \
      if checkyesno zfs_enable; then \
          echo 'yes'; \
      else \


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912051057.nB5AvFkN091422>