[systemd-devel] guidance on how to get systemd to function
Greetings I am learning to use systemd. My computer has grub2 installed. the linux kernel version is linux-3.10.4. It has sysV-init and udev-182. I am about to remove udev and install systemd-206 ( and all the dependencies thereof ). I will thentry starting the machine with systemd. But I dont not know how to do this. Firstly I read somewhere that I need to add init=/usr/lib/systemd/systemd to /boot/grub/grub.cfg to get systemd to work. This is the only definite piece of advice I have been able to garner from my search on the internet. Now as regards 'starting with systemd' this is my list of **know's** and **dont-know's**:- --I do know I need to remove udev-182, --I do not know if I need to remove init scripts from /etc/rc.d and/or if I need to disable /etc/inittab --I do not know if I need some type of script file that calls the various systemd service files in a manner say akin to the old rc.sysinit such as :- systemctlenable service Calooh systemctlenable service Callay systemctlenable service Boroughgroves etc ... ---and if I do when to call it ---and if I dont how/when to call systemd and direct it to start only the services neded ( of those installed ). advice would be appreciated. Yours sincerely luxInteg ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] guidance on how to get systemd to function
You failed to say what's your distro. On Fri, Aug 2, 2013 at 9:03 AM, lux-integ lux-in...@btconnect.com wrote: Greetings I am learning to use systemd. My computer has grub2 installed. the linux kernel version is linux-3.10.4. It has sysV-init and udev-182. I am about to remove udev and install systemd-206 ( and all the dependencies thereof ). I will thentry starting the machine with systemd. But I dont not know how to do this. Firstly I read somewhere that I need to add init=/usr/lib/systemd/systemd to /boot/grub/grub.cfg to get systemd to work. This is the only definite piece of advice I have been able to garner from my search on the internet. Now as regards 'starting with systemd' this is my list of **know's** and **dont-know's**:- --I do know I need to remove udev-182, --I do not know if I need to remove init scripts from /etc/rc.d and/or if I need to disable /etc/inittab --I do not know if I need some type of script file that calls the various systemd service files in a manner say akin to the old rc.sysinit such as :- systemctlenable service Calooh systemctlenable service Callay systemctlenable service Boroughgroves etc ... ---and if I do when to call it ---and if I dont how/when to call systemd and direct it to start only the services neded ( of those installed ). advice would be appreciated. Yours sincerely luxInteg ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] guidance on how to get systemd to function
On Fri, Aug 2, 2013 at 11:03 AM, lux-integ lux-in...@btconnect.com wrote: Firstly I read somewhere that I need to add init=/usr/lib/systemd/systemd to /boot/grub/grub.cfg to get systemd to work. This is the only definite piece of advice I have been able to garner from my search on the internet. That sounds about right, but you would be better off checking the documentation of your distro to find the definite answer (as the details depend on how they implement things). Now as regards 'starting with systemd' this is my list of **know's** and **dont-know's**:- --I do know I need to remove udev-182, Correct, it will be replaced by systemd-udevd, which in principle also sysvinit could make use of. --I do not know if I need to remove init scripts from /etc/rc.d and/or if I need to disable /etc/inittab You don't. They will both be ignored, and can be kept around in case you want to roll back. --I do not know if I need some type of script file that calls the various systemd service files in a manner say akin to the old rc.sysinit such as :- Not at all, no. systemctlenable service Calooh systemctlenable service Callay systemctlenable service Boroughgroves etc ... ---and if I do when to call it ---and if I dont how/when to call systemd and direct it to start only the services neded ( of those installed ). When you point init=/usr/lib/systemd/systemd, systemd will be PID1 and it will start your default.target (typically pointing to multi-user.target or graphical.target), which will pull in all the needed dependencies. See http://www.freedesktop.org/software/systemd/man/bootup.html for a more detailed explanation. HTH, Tom ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] guidance on how to get systemd to function
On Friday 02 August 2013 10:29:54 Carlos Silva wrote: You failed to say what's your distro. this is my distribution, made by compiling EVERYTHING from source code. I hope this is informative sincerely luxInteg ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] guidance on how to get systemd to function
On Friday 02 August 2013 10:34:37 Tom Gundersen wrote: When you point init=/usr/lib/systemd/systemd, systemd will be PID1 and it will start your default.target (typically pointing to multi-user.target or graphical.target), which will pull in all the needed dependencies thanks for your reply Would you care to elaborate what PID1 is please? I shall presume the so called default target in this instance is multi-user- target.as I am not using X windows and hopefully wont ever need systemd for xwindows.. Now I have put custom service files in /etc/systemd./system I am using my own service and mount files to mount kernel-based filesystems and the root filesysem. I am using my own service files for for hwclock, ntp , rsyslog and network cofiguration. How will systemd know how to use the files I put in /etc/systemd/system and not try and substitute so called 'defaut' ones? advice would be appreciated. sincerely luxInteg ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] guidance on how to get systemd to function
Am 02.08.2013 12:01, schrieb lux-integ: thanks for your reply Would you care to elaborate what PID1 is please? https://www.google.com/search?q=PID1#sclient=psy-abq=PID1+linux http://0pointer.de/blog/projects/systemd.html signature.asc Description: OpenPGP digital signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount
On Tuesday 2013-07-30 20:41, Vivek Goyal wrote: FYI, I don't see any CC's on the original mail as displayed on GMane via NNTP... Neither do I, with a normal (non-NTTP, non-Gmail) setup. I am CCed in original mail and that's why I got a copy of it in my Inbox. If you did, you should be able to locate the second copy, received from the mailing list software. I am not sure how did Tom receive that mail. If my email id somehow automatically got stripped, I have no idea how that can happen. I am trying to look into systemd-devel archives but there does not seem to be any info who is CCed on the mail. Because there was no one CCed. Which either means that the original sender issued two different mail envelopes with two different mail bodies, or that the ML software stripped the CCs. Looking at the Message-Id and perhaps Received: field could perhaps reveal different messages and/or the path where one envelope was split. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] guidance on how to get systemd to function
On Fri, Aug 2, 2013 at 12:01 PM, lux-integ lux-in...@btconnect.com wrote: Would you care to elaborate what PID1 is please? I suggest you read up on systemd to answer this and many other standard questions. The link posted by Reindl is a good start, but I suggest also reading all the links under Manuals and Documentation for Users and Administrators (not all the manpages are necessary reading, but some of them are) and The systemd for Administrators Blog Series from http://www.freedesktop.org/wiki/Software/systemd/. I shall presume the so called default target in this instance is multi-user- target.as I am not using X windows and hopefully wont ever need systemd for xwindows.. By default, default.target is multi-user.target. You can find out what yours is by calling systemctl get-default and change it with systemctl set-default. Now I have put custom service files in /etc/systemd./system I am using my own service and mount files to mount kernel-based filesystems and the root filesysem. I am using my own service files for for hwclock, ntp , rsyslog and network cofiguration. Before adding your own service files, I strongly recommend first trying the default ones shipped with systemd. You'll then get an example of how things should be set up. In particular, you won't need your own service files for kernel-based filesystems, the root filesystem nor hwclock as these are all covered by the systemd defaults. Also, I believe rsyslog comes with systemd service files by default, so you don't need your own for that either. For network configuration and ntp that depends on what software you use, some come with systemd service files by default and others do not (but check the files shipped by one of the standard distros before writing your own). How will systemd know how to use the files I put in /etc/systemd/system and not try and substitute so called 'defaut' ones? Your files will take precedence if you give them the same name as they file you replace. See Unit Load Path in http://www.freedesktop.org/software/systemd/man/systemd.unit.html for details. HTH, Tom ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] guidance on how to get systemd to function
'Twas brillig, and Tom Gundersen at 02/08/13 10:34 did gyre and gimble: --I do not know if I need to remove init scripts from /etc/rc.d and/or if I need to disable /etc/inittab You don't. They will both be ignored, and can be kept around in case you want to roll back. Well, I/etc/rc.d/ (and /etc/rc?.d/) will be processed and the scripts there in automatically converted to units in /run/systemd/system/ if sysvinit support is complied into systemd. If such support is not compiled in, it will indeed be ignored as Tom said. /etc/inittab will always be ignored. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] fstab-generator: introduce rd.weak_sysroot to bypass failures in sysroot.mount
On Fri, Aug 02, 2013 at 12:15:32PM +0200, Jan Engelhardt wrote: On Tuesday 2013-07-30 20:41, Vivek Goyal wrote: FYI, I don't see any CC's on the original mail as displayed on GMane via NNTP... Neither do I, with a normal (non-NTTP, non-Gmail) setup. I am CCed in original mail and that's why I got a copy of it in my Inbox. If you did, you should be able to locate the second copy, received from the mailing list software. I have received only one copy. Did not receive any copy from mailing list. I think that is because I have not changed default user options in mailing list settings which allow one to specifiy whether to send mailing list copy or not if one is explicitly CCed in mail. I am not sure how did Tom receive that mail. If my email id somehow automatically got stripped, I have no idea how that can happen. I am trying to look into systemd-devel archives but there does not seem to be any info who is CCed on the mail. Because there was no one CCed. Which either means that the original sender issued two different mail envelopes with two different mail bodies, or that the ML software stripped the CCs. I suspect that's the case here. Somehow ML stripped CC. In reply mails CC are intact. So not sure why it will happen only with first mail. Thanks Vivek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] FYI setroubleshoot has better integration with journald in F20
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://danwalsh.livejournal.com/65777.html I think we need a systemctl status -verbose httpd -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlH7vtoACgkQrlYvE4MpobO1CwCguI7lgjY5nTOixl+F00quSEf3 IXwAnRvz3n0EQxmtTYbe2o1lwyR3WC0O =rqqR -END PGP SIGNATURE- ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] FYI setroubleshoot has better integration with journald in F20
On Fri, Aug 02, 2013 at 10:14:50AM -0400, Daniel J Walsh wrote: http://danwalsh.livejournal.com/65777.html I think we need a systemctl status -verbose httpd SELinux hints look like perfect fit for existing ”-x” switch. -- Tomasz TorczOnly gods can safely risk perfection, xmpp: zdzich...@chrome.pl it's a dangerous thing for a man. -- Alia ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] fixed hashmap leaks in mmap-cache
On Thu, Aug 01, 2013 at 12:40:01PM -0500, George McCollister wrote: hashmap_free() wasn't being called on m-contexts and m-fds resulting in a leak. Applied, thanks. To reproduce do: while(1) { sd_journal_open(j, SD_JOURNAL_LOCAL_ONLY); sd_journal_close(j); } I turned this into a minimalistic test, just to exercise more code paths in the test suite. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH 18/18] shell-comp: Fix up unit completing for _journalctl
On Thu, Aug 01, 2013 at 09:35:17PM -0500, William Giokas wrote: -u and --user-unit can be specified multiple times, so put a * in front of it, and --user-unit can have an =, and should be looking for the USER_UNIT not _SYSTEMD_USER_UNIT. Applied the whole series except this one. Actually user units can be logged with *either* USER_UNIT or _SYSTEMD_USER_UNIT. The filter that is used by journalctl can be seen with $ SYSTEMD_LOG_LEVEL=debug journalctl --user-unit goo | grep filter Journal filter: (((_UID=0 OR _UID=1001) AND OBJECT_SYSTEMD_USER_UNIT=goo.service) OR ((_UID=0 OR _UID=1001) AND COREDUMP_USER_UNIT=goo.service) OR (_UID=1001 AND USER_UNIT=goo.service) OR (_UID=1001 AND _SYSTEMD_USER_UNIT=goo.service)) $ ... --unit=goo ... Journal filter: ((OBJECT_SYSTEMD_UNIT=goo.service AND _UID=0) OR (UNIT=goo.service AND _PID=1) OR (COREDUMP_UNIT=goo.service AND _UID=0 AND MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1) OR _SYSTEMD_UNIT=goo.service) So the completion for both -u and --user-unit is showing not enough stuff. I'm not sure how to best fix that, and actually how much we want to fix that. I noticed some more problems: zsh completion for 'journalctl _EXEtab' is broken: it gives me 'journalctl _EXEspace', but I expect 'journalctl _EXE=/usr/bin/...'. This was broken before, so nothing to do with your patch series. The list of fields is hardcoded. Maybe we should grow a switch in journalctl which will dump a list of all available fields, and is use it in zsh and bash completion? kernel-install completion for zsh is missing. Overall, I think that after this split up, zsh completion might become less of a black box, making it easier for people to update both in sync. Zbyszek -{-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \ -'--user-unit[Show data only from the specified user session unit]:units:_journal_fields _SYSTEMD_USER_UNIT' \ +\*{-u,--unit=}'[Show data only from the specified unit]:units:_journal_fields _SYSTEMD_UNIT' \ +'*--user-unit=[Show data only from the specified user session unit]:units:_journal_fields USER_UNIT' \ {-p,--priority=}'[Show only messages within the specified priority range]:priority:_journal_fields PRIORITY' \ -- they are not broken. they are refucktored -- alxchk ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] FYI setroubleshoot has better integration with journald in F20
On Fri, Aug 02, 2013 at 04:36:15PM +0200, Tomasz Torcz wrote: On Fri, Aug 02, 2013 at 10:14:50AM -0400, Daniel J Walsh wrote: http://danwalsh.livejournal.com/65777.html I think we need a systemctl status -verbose httpd --full is not enough? journalctl has recently learned to output properly indented multiline messages... SELinux hints look like perfect fit for existing ”-x” switch. Not really, because setroubleshoot crafts a specific message for each AVC. It *could* be done, by outputting separate structured messages from each of the setroubleshoot plugins, and adding the message template from each plugin to the catalog, so that then journalctl could fill them in. But that would tie setroubleshoot very closely to journalctl, and I'm not sure what the gain would be. Zbyszek -- they are not broken. they are refucktored -- alxchk ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Slow firmware timeouts again (Re: [3.11 regression?] iwlwifi firmware takes two minutes to load)
[cc: linux-kernel, linux-hotplug, and systemd-devel. This is 3.11-rc3+] On Fri, Aug 2, 2013 at 12:38 AM, Johannes Berg johan...@sipsolutions.net wrote: On Thu, 2013-08-01 at 21:38 -0700, Andy Lutomirski wrote: At boot, I get: [ 12.537108] iwlwifi :03:00.0: irq 51 for MSI/MSI-X ... [ 132.676781] iwlwifi :03:00.0: loaded firmware version 9.221.4.1 build 25532 op_mode iwldvm This sounds familiar, but wasn't it fixed awhile ago? It wasn't exactly fixed and it's really more of a userspace problem - we probably request firmware version 8, and then it takes 30 seconds to time out for each of 8,7,6,5, after which the next request for 4 is successful. Why's it requesting those firmwares? They don't seem to exist on intellinuxwireless.org. I have: CONFIG_FW_LOADER=y # CONFIG_FIRMWARE_IN_KERNEL is not set CONFIG_EXTRA_FIRMWARE= CONFIG_FW_LOADER_USER_HELPER=y I don't know why your userspace isn't behaving differently though. johannes -- Andy Lutomirski AMA Capital Management, LLC ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Slow firmware timeouts again (Re: [3.11 regression?] iwlwifi firmware takes two minutes to load)
On Fri, Aug 2, 2013 at 9:21 AM, Johannes Berg johan...@sipsolutions.net wrote: On Fri, 2013-08-02 at 09:04 -0700, Andy Lutomirski wrote: It wasn't exactly fixed and it's really more of a userspace problem - we probably request firmware version 8, and then it takes 30 seconds to time out for each of 8,7,6,5, after which the next request for 4 is successful. Why's it requesting those firmwares? They don't seem to exist on intellinuxwireless.org. Well for one you've never even mentioned what device you have, and then also it's not requesting 8/7 only 6,5,4 -- I guess the timeout was increased to 60 seconds (or I'm remembering wrong and it always was? I thought it was 30s) I have an Ultimate-N 6300 (rev 35). It's requesting at least versions 6 and 5 (I saw them in udevadm monitor). It looks like the g2a and g2b variants have -5 and -6 versions, but 6000-4 appears to be the only relevant version for my hardware. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Slow firmware timeouts again (Re: [3.11 regression?] iwlwifi firmware takes two minutes to load)
On Fri, Aug 02, 2013 at 09:04:44AM -0700, Andy Lutomirski wrote: CONFIG_FW_LOADER_USER_HELPER=y Do you need this? Unsetting this should help. This option enables / disables the invocation of user-helper (e.g. udev) for loading firmware files as a fallback after the direct file loading in kernel fails. The user-mode helper is no longer required unless you have a special firmware file that resides in a non-standard path. Zbyszek -- they are not broken. they are refucktored -- alxchk ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] FYI setroubleshoot has better integration with journald in F20
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/02/2013 11:49 AM, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Aug 02, 2013 at 04:36:15PM +0200, Tomasz Torcz wrote: On Fri, Aug 02, 2013 at 10:14:50AM -0400, Daniel J Walsh wrote: http://danwalsh.livejournal.com/65777.html I think we need a systemctl status -verbose httpd --full is not enough? journalctl has recently learned to output properly indented multiline messages... SELinux hints look like perfect fit for existing ”-x” switch. Not really, because setroubleshoot crafts a specific message for each AVC. It *could* be done, by outputting separate structured messages from each of the setroubleshoot plugins, and adding the message template from each plugin to the catalog, so that then journalctl could fill them in. But that would tie setroubleshoot very closely to journalctl, and I'm not sure what the gain would be. Zbyszek Well I am looking for the user to see the entire multi-line message when running systemctl status UNITFILE Since this is where we want them to look first. Maybe have a comment at the bottom of systemctl status UNITFILE, that says run systemctl status --full UNITFILE to see full message. In the future when we eliminate the setroubleshoot.xml file and fully use the journal as our backing store, we can talk about that. The biggest thing would be for setroubleshoot to know if it saw the message before. Basically have a signature that it could look up. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlH7/1oACgkQrlYvE4MpobO99ACdEyHvkUbJ+WCSF/5JMi8haFkl zpQAnjRuv23cZtrLUtbLUJWcrwDIt/ua =Wyqu -END PGP SIGNATURE- ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] FYI setroubleshoot has better integration with journald in F20
On Fri, Aug 02, 2013 at 02:50:02PM -0400, Daniel J Walsh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/02/2013 11:49 AM, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Aug 02, 2013 at 04:36:15PM +0200, Tomasz Torcz wrote: On Fri, Aug 02, 2013 at 10:14:50AM -0400, Daniel J Walsh wrote: http://danwalsh.livejournal.com/65777.html I think we need a systemctl status -verbose httpd --full is not enough? journalctl has recently learned to output properly indented multiline messages... SELinux hints look like perfect fit for existing ”-x” switch. Not really, because setroubleshoot crafts a specific message for each AVC. It *could* be done, by outputting separate structured messages from each of the setroubleshoot plugins, and adding the message template from each plugin to the catalog, so that then journalctl could fill them in. But that would tie setroubleshoot very closely to journalctl, and I'm not sure what the gain would be. Zbyszek Well I am looking for the user to see the entire multi-line message when running systemctl status UNITFILE Since this is where we want them to look first. Maybe have a comment at the bottom of systemctl status UNITFILE, that says run systemctl status --full UNITFILE to see full message. I guess we could do that. We're always trying to conserve space, but we could return a value saying if there were ellipsized lines and append a hint at the bottom if there were. In the future when we eliminate the setroubleshoot.xml file and fully use the journal as our backing store, we can talk about that. The biggest thing would be for setroubleshoot to know if it saw the message before. Basically have a signature that it could look up. If you mean a specific line in the logs, than probably journal cursor should be used. If you mean a denial for the given object subject operation, then setroubleshoot would probably have to keep some state by itself. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] [PATCH] zsh completion: add _kernel-install
--- Makefile.am | 1 + shell-completion/zsh/_kernel-install | 26 ++ 2 files changed, 27 insertions(+) create mode 100644 shell-completion/zsh/_kernel-install diff --git a/Makefile.am b/Makefile.am index 8e64aaa..1b55c66 100644 --- a/Makefile.am +++ b/Makefile.am @@ -347,6 +347,7 @@ dist_zshcompletion_DATA = \ shell-completion/zsh/_systemctl \ shell-completion/zsh/_journalctl \ shell-completion/zsh/_udevadm \ + shell-completion/zsh/_kernel-install \ shell-completion/zsh/_systemd-nspawn \ shell-completion/zsh/_systemd-analyze \ shell-completion/zsh/_systemd diff --git a/shell-completion/zsh/_kernel-install b/shell-completion/zsh/_kernel-install new file mode 100644 index 000..0655188 --- /dev/null +++ b/shell-completion/zsh/_kernel-install @@ -0,0 +1,26 @@ +#compdef kernel-install + +_images(){ +if [[ $words[2] == remove ]]; then +_message 'No more options' +else +_path_files -W /boot/ -P /boot/ -g vmlinuz-* +fi +} + +_kernels(){ +read _MACHINE_ID /etc/machine-id +_kernel=( /lib/modules/[0-9]* ) +if [[ $cmd == remove -n $_MACHINE_ID ]]; then +_kernel=( /lib/modules/[0-9]* /boot/$_MACHINE_ID/[0-9]* ) +fi +_kernel=( ${_kernel##*/} ) +_describe installed kernels _kernel +} + +_arguments \ +'1::add or remove:(add remove)' \ +'2::kernel versions:_kernels' \ +'3::kernel images:_images' + +#vim: set ft=zsh sw=4 ts=4 et -- 1.8.3.4 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel