From owner-freebsd-bugs Thu Jul 16 06:21:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA08839 for freebsd-bugs-outgoing; Thu, 16 Jul 1998 06:21:04 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA08825 for ; Thu, 16 Jul 1998 06:20:59 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id GAA26873; Thu, 16 Jul 1998 06:20:03 -0700 (PDT) Received: from wafu.netgate.net (wafu.netgate.net [204.145.147.80]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id GAA08055 for ; Thu, 16 Jul 1998 06:16:32 -0700 (PDT) (envelope-from shigio@wafu.netgate.net) Received: (qmail 22561 invoked from network); 16 Jul 1998 05:16:17 -0000 Received: from ins15.tama-ap3.dti.ne.jp (HELO choota.signet.or.jp) (203.181.67.15) by wafu.netgate.net with SMTP; 16 Jul 1998 05:16:17 -0000 Received: (from shigio@localhost) by choota.signet.or.jp (8.8.7/) id WAA00734; Thu, 16 Jul 1998 22:18:05 +0900 (JST) Message-Id: <199807161316.GAA08055@hub.freebsd.org> Date: Thu, 16 Jul 1998 22:18:05 +0900 (JST) From: shigio@wafu.netgate.net Reply-To: shigio@wafu.netgate.net To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/7298: Improvements to ln(1). Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7298 >Category: bin >Synopsis: Improvements to ln(1). >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jul 16 06:20:01 PDT 1998 >Last-Modified: >Originator: Shigio Yamaguchi >Organization: Freelance programmer >Release: FreeBSD 2.2.5-RELEASE i386 >Environment: All environment. >Description: I have hacked ln(1) and added -r and -a option. -a If the -s option is specified, make absolute symbolic link. -r If the -s option is specified, make relative symbolic link. The -a and -r options override each other; the last one specified deter- mines the method used. These options work like follows. % cd /usr/src/sys % ln -sfr kern/tty.c /usr/obj/usr/src/sys/kern % ls -l /usr/obj/usr/src/sys/kern/tty.c lrwxrwxrwx 1 shigio bin 29 Jul 16 21:55 /usr/obj/usr/src/sys/kern/tty.c -> ../../../../../src/kern/tty.c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (right and relative symbolic link) % cd /usr/src/sys % ln -sfa kern/tty.c /usr/obj/usr/src/sys/kern % ls -l /usr/obj/usr/src/sys/kern/tty.c lrwxrwxrwx 1 shigio bin 19 Jul 16 21:57 /usr/obj/usr/src/sys/kern/tty.c -> /usr/src/kern/tty.c ~~~~~~~~~~~~~~~~~~~ (right and absolute symbolic link) Note that both symbolic links are right. >How-To-Repeat: It is not a bug but neither -r nor -a option specified, the result is % cd /usr/src/sys % ln -sf kern/tty.c /usr/obj/usr/src/sys/kern % ls -l /usr/obj/usr/src/sys/kern/tty.c lrwxrwxrwx 1 shigio bin 10 Jul 16 21:59 /usr/obj/usr/src/sys/kern/tty.c -> kern/tty.c ~~~~~~~~~~ (wrong symbolic link) % cat /usr/obj/usr/src/sys/kern/tty.c cat: /usr/obj/usr/src/sys/kern/tty.c: No such file or directory >Fix: Source code is here. It includes Makefile, related library source and online manuals too. ftp://ftp.freebsd.org/pub/FreeBSD/incoming/pathconvert4.tar.gz >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message