Tag Info

Hot answers tagged

6

Many Daemons are run using bash as the scripting language. You won't have any issues using it.


3

As a general rule, it is quite tricky to create a daemon in bash (or shell-script in general). Some problems like background fork, output and error messages redirection or signal handling are not easy to get right. For the specific problem you describe there is already some (free) software doing automatic ssh connexion with respawn. I use autossh for this ...


3

It's not really possible. You simply can not prevent someone powering on/off a computer, or indeed them doing whatever they want with it once they have hands on access. I've done something similar, for a server. It uses full disk encryption and produces its key based on hardware data such as CPU type, Mac Address, amount of memory installed, etc. If someone ...


3

Debian (or any other Linux distribution) will work without swap partition - just don't create one during installation. You can use swap file instead of partition. The swap file can be prepared by the following example commands: sudo fallocate -l 512MB /swapfile sudo mkswap /swapfile The first one creates a 512 MB file, the second one format it as swap ...


2

As the 'Note:' hints at, this is usually caused by $PATH being set wrong. One way that happens is when you run dpkg -i without root; but that isn't the case here. An easy way to confirm the path is to run sudo -s, which tells sudo to run a shell instead of some other program. So you'll be landed at a root shell prompt. If you echo "$PATH", you'll likely ...


2

I have a few ways to do this, easy ones first: Making the install prefix flexible is hard - I would just make the install prefix to your home directory, or somewhere that you can access on any of the machines, and use make install DESTDIR=/path/to/place/where/binaries/should/be/installed to install them to somewhere other than the prefix. I personally have ...


2

Use sudo. (But power off should not be prevented or people will pull the plug instead.) Some config files can be tightened to the point where they cannot be viewed; however others (critically DNS configuration) do not work if not world-readable. For each file you have to read the manual to find out. If full disk encryption + TPM-provided boot password ...


2

This line: -su: 29: /usr/share/bash-completion/bash_completion: [[: not found tells me that /bin/sh isn't a bash shell (on modern Debian, it's almost certainly dash), but it's trying to source a bash script. So, the question you need to answer is why a non-bash shell is trying to source the bash_completion script. I'm guessing that the problem is one of ...


2

The error you got almost certainly means that backup.7z is not a 7zip archive, or has been corrupted. You can check the "not a 7zip archive" option by running file backup.7z and seeing what it says. (Incidentally, while verifying this, I discovered that 7z can disassemble a .dll file into its component sections -- which made reproducing the error message a ...


1

from impacket import version, smbconnection, winregistry, ntlm in this case means from the package impacket, import the modules version, smbconnection, winregistry and ntlm. This means you need impacket, the package, not winregistry, a submodule of impacket, on the path. Try putting the whole package on the path somewhere, or just putting the impacket ...


1

Does squeeze not have a 1.25 backport? If not, you can create your own by backporting the squeeze Debian sources. It's not hard. See How can I install more recent versions of software than what Debian provides? Once you have alsa binary packages, you can create an apt repo and pull from that. Don't use checkinstall. If you want more details, please comment. ...


1

You probably can not. They are different hardware platforms. Your phone is probably arm based and your desktop is probably x86 based.


1

The latest, Adobe-supported version of Flash for Linux is version 11.2. This was initially released several years ago and some websites now require a newer version. The latest version of Flash for Linux (version 14.0 as of mid 2014) is maintained by Google and comes standard with Google Chrome (not Chromium). In many cases where Flash doesn't work with ...


1

If you have the ftp user's home directory pointed to a mountpoint on the usb device, and the FTP client is set to write in the default directory, the hard drives will be not be utilized for the file storage. You may find that reads and writes are faster, but it's been my experience USB flash drives have life more limited than your hard drive. Personally, ...


1

You can make dpkg run a command before or after package management operations. Pass the option --pre-invoke=COMMAND or --post-invoke=COMMAND; the command is executed with the environment variable DPKG_HOOK_ACTION set to the nature of the action. This isn't very conveninent because these hooks run once per dpkg invocation, not once per package, and they don't ...


1

Since you are using Debian, a possible way of doing this is by using apts built-in machinery. Apt can be configured to run a script on updates. See for example, the package apt-listchanges, which "is a tool to show what has been changed in a new version of a Debian package, as compared to the version currently installed on the system", specifically, by ...


1

The debconf question partman-partitioning/default_label should set the partition table type. You also need to set the boolean question partman-partitioning/confirm_write_new_label to true or partman will not overrite an existing partition table. So you should put in your pressed file : d-i partman-partitioning/default_label select msdos d-i ...


1

If this is true, what is so special about dpkg that is not available with the other commands? The other commands are not a package manager replacement, that's what makes dpkg so special. You can really extract the contents of all the package and drop it in your root directory, but that doesn't mean they will be working properly. You have no way of ...


1

kernel.org has some excellent documentation on Applying Patches to the Linux Kernel. Essentially, you use the patch command. Once you have acquired the patch (here called patchfile), place it in your build directory and then issue the command: patch -p <num> < patchfile where <num> is the number of leading slashes to remove from the ...


1

the new ATA driver in the kernel use /dev/sda, the old drivers are still supported but you will have to edit your kernel by chrooting into you system using a livecd. Device drivers ---> <*> ATA/ATAPI/MFM/TLL support (deprecated) <*> Serial ATA and Parallel ATA drivers ---> For chrooting I always use the gentoo minimal installation cd ...


1

For Debian Wheezy, all of the entries should be wheezy or higher. Therefore, I recommend you change squeeze to wheezy. After doing so, run apt-get update and apt-get upgrade, as I would expect you have several security updates to install.


1

Since /tmp is a separate filesystem, you want to get an unblemished view of the contents of that filesystem (without the interference from the /dev/sda1 filesystem, which is mounted on the subordinate /tmp/FOO mount point), so you need to do a bind mount on /tmp: mount --bind /tmp /tmp/BAR Now /tmp/BAR should show you the contents of /tmp, and ...


1

First of all, is the host machine network interface is connected to the trunked port ? you can test this simple with the command vconfig to create the vlan interface on the fly, # vconfig add [interface-name] [vlan-id] # ( you will need 8021q module loaded ) # -e.g. vconfig add em1 100 ip addr show ... 12: em1.100@em1: ...


1

Short answer From the Debian wiki page dedicated to D-I preseed : Do not work off a debconf-get-selections (--installer) generated preseed.cfg but get the values from it and modify the example preseed file with them. The preseed example file provided by Debian should be enought to start but you can find a lot of other preseed files provided by ...


1

The Debian wiki has some more comprehensive and specific guidance than the already-mentioned Debian Policy Manual. See AccountHandlingInMaintainerScripts: The adduser program does the right thing if called with the --system option. It is thus usually only necessary to call adduser --system $USERNAME in your postinst to create the account with ...



Only top voted, non community-wiki answers of a minimum length are eligible