summaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* update-alternatives: use 'ln -n'pixdamix@gmail.com2012-11-221-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the '-n' option (--no-dereference) is a better way to solve the do-not-link-into-directory issue. Using only 'ln -sf' can cause problems on SELinux enabled hosts when target is inaccessible; e.g. when preparing an offline rootsystem: | $ cd <offline root> | $ ln -sf /lib/systemd/systemd sbin/init # alternative #1 | $ ln -sf /bin/busybox sbin/init # alternative #2 | ln: accessing `sbin/init': Permission denied | | --> strace: | brk(0) = 0x102b000 | stat("sbin/init", 0x7fffaa91c900) = -1 EACCES (Permission denied) | ... | exit_group(1) = ? Now with '-n': | $ ln -snf /bin/busybox sbin/init | lstat("sbin/init", {st_mode=S_IFLNK|0777, st_size=20, ...}) = 0 | lstat("sbin/init", {st_mode=S_IFLNK|0777, st_size=20, ...}) = 0 | stat("/bin/busybox", 0x7fff8c1a3bd0) = -1 ENOENT (No such file or directory) | symlink("/bin/busybox", "sbin/init") = -1 EEXIST (File exists) | unlink("sbin/init") = 0 | symlink("/bin/busybox", "sbin/init") = 0 The '-n' flag is well supported (coreutils have it at least since 1999, busybox at least since 0.60.3 (2002)) and it obsoletes the explicit check whether target is a directory. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> git-svn-id: http://opkg.googlecode.com/svn/trunk@649 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Two fixes from Martin Jansa <martin.jansa@gmail.com>.graham.gower2009-12-021-4/+12
| | | | | | | | | * if there are more alternatives with highest priority, use the one last in alternatives file (latest installed) * if target exists and is a directory, remove link, otherwise new alternative link is created inside that direstory git-svn-id: http://opkg.googlecode.com/svn/trunk@439 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Maks sure scripts get packaged florian.boor2009-11-271-0/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@402 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Respect the --with-opkglibdir configure switch in update-alternatives.graham.gower2009-11-191-1/+1
| | | | | | From John L. Chmielewski <jlcster@gmail.com>. git-svn-id: http://opkg.googlecode.com/svn/trunk@342 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: * Add opkg-key utilityticktock352008-12-153-0/+264
* Move update-alternatives to utils directory * Update opkg_verify_file function to import keys from /etc/opkg git-svn-id: http://opkg.googlecode.com/svn/trunk@106 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358