Date: Fri, 28 May 2004 18:16:00 -0500 From: "J.D. Bronson" <jbronson@wixb.com> To: mdh@jcn.net Cc: freebsd-questions@freebsd.org Subject: Re: ramdisk-own on 5.2.1 Message-ID: <6.1.1.1.2.20040528181531.00bfdf50@cheyenne.wixb.com> In-Reply-To: <200405282314.i4SNE097009721@logcabin.hem.com> References: <6.1.1.1.2.20040528180423.00bd1658@cheyenne.wixb.com> <200405282314.i4SNE097009721@logcabin.hem.com>
next in thread | previous in thread | raw e-mail | index | archive | help
THANKS GUYS!!! - that was FAST!!!! At 06:14 PM 5/28/2004, Michael D Hughes wrote: >J.D., > Take the set -x out. > > > = Copied from message sent on Fri May 28 18:07:14 2004 > by J.D. Bronson Subject:ramdisk-own on 5.2.1. > > > > 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 > > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > > > > > > > > >-- >Michael D Hughes Loghome living is the best! >mdh@jcn.net -- 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.20040528181531.00bfdf50>