I had created a zfs array, and I am using it as a /music partition (/ is on another disk, using the UFS file system).
I have created a little script, zfstart.sh:
runinig
mounts the /music partition and it is ready to be used.
I would like to run it automatically on boot. For that purpose, I have tried to use the following script:
I have put the script in /usr/local/etc/rc.d with the name zfs-mount, fixed the right permissions for it, and added the line zfs-
to /etc/rc.conf.
However, it does not work, and all I get is the following message:
What am I doing wrong? How can I fix it?
I have created a little script, zfstart.sh:
Code:
#!/bin/sh
/sbin/zfs set mountpoint=/music tank/music
Code:
./zfstart.sh
I would like to run it automatically on boot. For that purpose, I have tried to use the following script:
Code:
#!/bin/sh
zfs-mount_enable=${slpd_enable-"NO"}
zfs-mount_flags=${zfs-mount_flags-"-p /var/run/zfs-mount.pid"}
Code:
. /etc/rc.subr
name="zfs-mount"
rcvar=$(set_rcvar)
#command='/sbin/zfs set mountpoint=/music tank/music'
command="./root/zfstart.sh"
load_rc_config "${name}"
run_rc_command "$1"
I have put the script in /usr/local/etc/rc.d with the name zfs-mount, fixed the right permissions for it, and added the line zfs-
Code:
mount_enable="YES"
However, it does not work, and all I get is the following message:
Code:
zfs-mount_enable=YES: not found
Code:
uname -a
FreeBSD nisooi.workgroup 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009 [email]root@almeida.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC i386
Code:
nisooi# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s2a 30462636 5617412 22408214 20% /
devfs 1 1 0 100% /dev
tank/music 383941248 116169728 267771520 30% /music