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: [EMAIL PROTECTED] // Pager: 414.314.8282
>
> _______________________________________________
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
>
>
>



-- Michael D Hughes Loghome living is the best! [EMAIL PROTECTED]




--
J.D. Bronson
Aurora Health Care // Information Services // Milwaukee, WI USA
Office: 414.978.8282 // Email: [EMAIL PROTECTED] // Pager: 414.314.8282

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to