Article 5RTQ1 LXC : symlink after last update

LXC : symlink after last update

by
marav
from LinuxQuestions.org on (#5RTQ1)
Quote:
Originally Posted by kaott(Post 6300545)The symlinks in the new lxc-4.0.11 package under /etc/bash_completion.d seem to all be broken.

It seems like the SlackBuild tries to avoid this, but the install script ends up creating the links anyway.
Recompiled with the .SlackBuild
Code:Unless your existing installation script already contains the code
to create these links, you should append these lines to your existing
install script. Now's your chance. :^)

Would you like to add this stuff to the existing install script and
remove the symbolic links ([y]es, [n]o)? y

Removing symbolic links:
removed './usr/lib64/liblxc.so'
removed './usr/lib64/liblxc.so.1'
removed './etc/bash_completion.d/lxc-attach'
removed './etc/bash_completion.d/lxc-cgroup'
removed './etc/bash_completion.d/lxc-wait'
removed './etc/bash_completion.d/lxc-checkpoint'
removed './etc/bash_completion.d/lxc-start'
removed './etc/bash_completion.d/lxc-config'
removed './etc/bash_completion.d/lxc-ls'
removed './etc/bash_completion.d/lxc-execute'
removed './etc/bash_completion.d/lxc-autostart'
removed './etc/bash_completion.d/lxc-unfreeze'
removed './etc/bash_completion.d/lxc-monitor'
removed './etc/bash_completion.d/lxc-stop'
removed './etc/bash_completion.d/lxc-info'
removed './etc/bash_completion.d/lxc-freeze'
removed './etc/bash_completion.d/lxc-destroy'
removed './etc/bash_completion.d/lxc-device'
removed './etc/bash_completion.d/lxc-create'
removed './etc/bash_completion.d/lxc-snapshot'
removed './etc/bash_completion.d/lxc-top'
removed './etc/bash_completion.d/lxc-unshare'
removed './etc/bash_completion.d/lxc-console'
removed './etc/bash_completion.d/lxc-copy'
removed './etc/bash_completion.d/lxc-usernsexec'


Updating your ./install/doinst.sh...Code:blackstar :: ~ ls /tmp/package-lxc/etc/bash_completion.d
blackstar :: ~ but, in fact they are not removed
Code:blackstar:~:# ls -l /etc/bash_completion.d
total 0
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-attach -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-autostart -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-cgroup -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-checkpoint -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-config -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-console -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-copy -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-create -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-destroy -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-device -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-execute -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-freeze -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-info -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-ls -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-monitor -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-snapshot -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-start -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-stop -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-top -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-unfreeze -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-unshare -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-usernsexec -> lxc
lrwxrwxrwx 1 root root 3 nov. 12 09:45 lxc-wait -> lxcProbably because of that :

blackstar :: ~ cat /tmp/package-lxc/install/doinst.sh
Code:config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}

preserve_perms() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ -e $OLD ]; then
cp -a $OLD ${NEW}.incoming
cat $NEW > ${NEW}.incoming
mv ${NEW}.incoming $NEW
fi
config $NEW
}

preserve_perms etc/rc.d/rc.lxc.new
config etc/lxc/default.conf.new
config etc/default/lxc.new

( cd etc/bash_completion.d ; rm -rf lxc-attach )
( cd etc/bash_completion.d ; ln -sf lxc lxc-attach )
( cd etc/bash_completion.d ; rm -rf lxc-autostart )
( cd etc/bash_completion.d ; ln -sf lxc lxc-autostart )
...
latest?d=yIl2AUoC8zA latest?i=crh7zQRFR_0:zcNTCsYKmlw:F7zBnMy latest?i=crh7zQRFR_0:zcNTCsYKmlw:V_sGLiP latest?d=qj6IDK7rITs latest?i=crh7zQRFR_0:zcNTCsYKmlw:gIN9vFw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments