Date: Fri, 28 May 2004 18:07:14 -0500 From: "J.D. Bronson" <jbronson@wixb.com> To: freebsd-questions@freebsd.org Subject: ramdisk-own on 5.2.1 Message-ID: <6.1.1.1.2.20040528180423.00bd1658@cheyenne.wixb.com>
next in thread | raw e-mail | index | archive | help
I have a script which was provided to me (from a PR log) and its for ramdisk-ownership: ============================================================= # PROVIDE: ramdisk-own # REQUIRE: ramdisk mountcritlocal # BEFORE: SERVERS # KEYWORD: FreeBSD . /etc/rc.subr name="ramdisk" stop_cmd=":" start_cmd="ramdisk_own_start" ramdisk_own_start() { set -x for unit in $ramdisk_units; do device="/dev/md$unit" dir=`mount | grep $device | cut -d' ' -f3` eval owner=\$ramdisk_${unit}_owner eval perms=\$ramdisk_${unit}_perms [ "X$owner" != "X" ] && chown -f "$owner" $device $dir [ "X$perms" != "X" ] && chmod -f "$perms" /dev/md$unit $dir done } load_rc_config $name run_rc_command "$1" ============================================================================= ...however, this results is MESSY output to the console and log file(s): Setting hostname: shadow. + device=/dev/md0 + mount + grep /dev/md0 + cut -d -f3 + dir=/tmp + eval owner=$ramdisk_0_owner + owner=root:wheel + eval perms=$ramdisk_0_perms + perms=1777 + [ Xroot:wheel != X ] + chown -f root:wheel /dev/md0 /tmp + [ X1777 != X ] + chmod -f 1777 /dev/md0 /tmp + device=/dev/md1 + grep /dev/md1 + cut -d -f3 + mount + dir=/var/spool/MIMEDefang + eval owner=$ramdisk_1_owner + owner=defang:defang + eval perms=$ramdisk_1_perms + perms=0700 + [ Xdefang:defang != X ] + chown -f defang:defang /dev/md1 /var/spool/MIMEDefang + [ X0700 != X ] + chmod -f 0700 /dev/md1 /var/spool/MIMEDefang + _return=0 + [ 0 -ne 0 ] + [ -n ] + return 0 ...but it does work 100%. Is there any way of 'cleaning' this up so that one does not see these messages, but that the work is DONE? -- J.D. Bronson Aurora Health Care // Information Services // Milwaukee, WI USA Office: 414.978.8282 // Email: jd@aurora.org // Pager: 414.314.8282
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.1.1.1.2.20040528180423.00bd1658>