I am working on a debian package which usually installs in /tftpboot/linux/This packages is also distributed on UCS (Univention Corporate Server), a debian based server system.They need these files in another directory (/var/lib/univention-client-boot). How do I adapt the corresponding debian files to make it recognize if the system is UCS and then move the files to the directory, or link these directories during install of this deb file?
Install deb Package files in another directory
debian;package management;packaging
You could do this in a .postinst script - check to see if it is being installed on the UCS server and create the required directory structure (under /var/lib/var/lib/univention-client-boot) and symlnks.Note that if you want to follow debian policy, the symlinks should be made relative (to the directory containing the symlinks), not with absolute paths.  For a private package, strict adherence to debian policy isn't necessary.You should also have a .postrm or .prerm script to remove the symlinks (and the directories, if they are empty) when the package is removed.