Systemd-Networkd - post_up and pre_down script?

I've used the old netcfg before, now I reinstall a system and configure my network-cards with systemd-networkd.
I used the POST_UP and PRE_DOWN-functions for issuing a command, how do I map this functionality to networkd-systemd?

Mr.Elendig wrote:Depends on just what you are trying to do.
What exactly do you mean?
I need to run a command when the device is up and before its going to be down.
How is this possible?

Similar Messages

  • Systemd-networkd, wpa_supplicant and multiple USB Wifi adapters

    TL;DR:
    Is there a way to run a single wpa_supplicant process that handles any kind of USB WiFi adapter in connection with systemd-networkd?
    Long version:
    I'm running systemd-networkd, which has made networking setup a lot easier for wired interfaces. I'd like to make it just as easy for WiFi interfaces, but it seems there's some kind of wildcard support missing for wpa_supplicant. My question is whether I got this right, or there is some trick somewhere I didn't think of.
    Here's my /etc/systemd/network/wifi.network:
    [Match]
    Name=wlp*
    [Network]
    DHCP=v4
    In addition, I'm running:
    systemctl start wpa_supplicant@wlp0s2f1u10
    because that's the interface that my current WiFi USB adapter comes up on. This goes with /etc/wpa_supplicant/wpa_supplicant-wlp0s2f1u10.conf:
    ctrl_interface=/run/wpa_supplicant
    eapol_version=1
    ap_scan=1
    fast_reauth=1
    network={
    ssid="something"
    psk="else"
    This all works fine, except that:
    I have to plug my USB Wifi adapter into this exact USB port, otherwise the interface name changes and wpa_supplicant isn't running there
    if I plug in a different USB WiFi adapter (I have a zoo; nothing exceptional I guess, but it's a pain to keep track of which goes with which computer), the interface name may be different and wpa_supplicant isn't running there
    systemd-networkd solved that problem nicely with the wildcard in the interface name above (Name=wlp*). (Also, dhcpcd -- which I'm not using in this setup -- can be told to listen to "all interface" which is sort of similar)
    My question: can I do something similar with wpa_supplicant, so I don't have to run a separate wpa_supplicant daemon on all possible interface names?
    I'm guessing the answer is No (and I'd like confirmation on that).
    Secondly, perhaps I can write one or more udev rules that will present all of those possible interfaces as wlan0, wlan1 or such. In which case I could presumably run wpa_supplicant@wlan0 only and be happy (assuming that wpa_supplicant is happy to run even as long as the interface does not exist. Does it?) Anybody have any hints how to go about this, I haven't done that.
    Thirdly, if neither of those are viable, is this a reasonable-enough set of requirements so it would  make sense to run this by the wpa_supplicant developers as a possible future feature?
    Last edited by jernst (2015-01-11 05:54:31)

    jernst wrote:
    systemd-networkd solved that problem nicely with the wildcard in the interface name above (Name=wlp*). (Also, dhcpcd -- which I'm not using in this setup -- can be told to listen to "all interface" which is sort of similar)
    My question: can I do something similar with wpa_supplicant, so I don't have to run a separate wpa_supplicant daemon on all possible interface names?
    networkd "solved" nothing here. This is a mere coincidence that the wlp* wildcard works. For instance, you might have an interface called "wls1". Also, wpa_supplicant doesn't "listen" because "listen" applies to the TCP/IP layer. wpa_supplicant works at the frame level, so I'm not sure what you mean. If you want software that _manages_ multiple wifi interfaces, use netctl.
    jernst wrote:I'm guessing the answer is No (and I'd like confirmation on that).
    Correct.
    jernst wrote:Secondly, perhaps I can write one or more udev rules that will present all of those possible interfaces as wlan0, wlan1 or such. In which case I could presumably run wpa_supplicant@wlan0 only and be happy (assuming that wpa_supplicant is happy to run even as long as the interface does not exist. Does it?) Anybody have any hints how to go about this, I haven't done that.
    For the udev part, do something like
    : cat /etc/udev/rules.d/10-network.rules
    SUBSYSTEM=="net", ATTR{address}=="a1:b1:c1:d1:e1:f1", NAME="wl0"
    SUBSYSTEM=="net", ATTR{address}=="a2:b2:c2:d2:e2:f2", NAME="wl1"
    Then, modify [email protected] as
    : diff usr/lib/systemd/system/[email protected]{,.new}
    +++ usr/lib/systemd/system/[email protected] 2015-01-12 11:45:10.839852357 -0700
    --- usr/lib/systemd/system/[email protected] 2015-01-12 11:44:56.843027430 -0700
    @@ -1,5 +1,6 @@
    [Unit]
    Description=WPA supplicant daemon (interface- and nl80211 driver-specific version)
    -Requires=sys-subsystem-net-devices-%i.device
    After=sys-subsystem-net-devices-%i.device
    # NetworkManager users will probably want the dbus version instead.
    so that the unit doesn't fail if the adapter is not plugged. However, this solution is suboptimal (Think what happens if you suddenly remove the adapter)... You can try to use "BindsTo=" instead of "Requires=" but I wonder if you get errors on startup if the adapter is absent...
    jernst wrote:Thirdly, if neither of those are viable, is this a reasonable-enough set of requirements so it would  make sense to run this by the wpa_supplicant developers as a possible future feature?
    No. wpa_supplicant is only supposed to to what it's told. It is not a canned network management solution.

  • Unable to set up networking with systemd-networkd

    I'm trying to set up networking on a VPS I purchased.
    When I boot off the arch install image, the networking set up is configured via DHCP and everything seems to work perfectly.
    This is the configuration I see from the
    ip addr
    and
    ip route
    commands:
    http://i.imgur.com/yeLFO6x.png
    I proceeded to follow the instructions at the systemd-networkd page, and enabled the right services.
    I also created an ethernet.network file in the correct directory.
    You can see the contents of the file in the following screenshot, along with the ouput of some of the ip commands in the following screenshot.
    http://i.imgur.com/hJNIZrJ.png
    I'm unable to ping google, but somehow I'm able to curl successfully download the google.com page via curl.
    I've demonstrated this in the following screenshot. I cannot fathom how this is possible.
    http://i.imgur.com/YokAKog.png
    I'll be happy to provide any other information that could be useful, and would really appreciate some help getting to the bottom of this.
    Thanks a tonne.
    -- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

    That subnet is not only odd - it should not work.
    A /32-subnet is perfect for localhost and the like. It basically means you can't reach any other IP than your own.
    Also the gateway from your provider's DHCP-server (first screenshot) ist very far away from your own IP. I'm too lazy to calculate, but in order to reach that gateway with that IP, the netmask would have to be between 16 and 8.
    In short: I can easily tell you why it wouldn't work - what I don't get is why it worked with curl in your setup or your provider's DHCP and/or what your provider did there.
    In any case: talk to your provider - they might be able to give you the correct addresses/masks and maybe shed some light (I'm really very curious).
    Last edited by PaterSiul (2015-04-19 18:40:57)

  • Systemd service and root script

    I have simple "regroup.service" for systemd, it excue on start "script.sh". Systemd excue "regroup.service" on start but command in script requires root permission.
    -rwxr--r-- 1 root root 316 05-31 21:24 /usr/lib/systemd/scripts/script.sh
    Which way is the best for excue script via systemd?
    Last edited by sobota (2013-05-31 20:19:11)

    Script do:
    #!/bin/sh
    exist=false
    start(){
    fil=$(ls /dev/nvidia* | wc -l)
    if [ $fil != "0" ]
    then
    exist=true
    chgrp video /dev/nvidia*
    fi
    stop(){
    if [ $exist ]
    then
    chgrp root /dev/nvidia*
    fi
    case $1 in
    start|stop) "$1" ;;
    *) echo "You should pass correct options like start or stop" ;;
    esac
    When I call service "#systemctl start regroup" group is changed.
    Last edited by sobota (2013-05-31 22:13:37)

  • Managing WPA wireless with systemd-networkd ?

    Hi guys,
    I've moved to systemd-networkd to manage my wired interface.
    http://dabase.com/blog/Good_riddance_netctl/
    Has anyone successfully managed to get their /etc/wpa_supplicant.conf working through  systemd-networkd too?

    WonderWoofy wrote:
    Okay, so I'll walk you through this since there is really not a whole lot of documentation on the subject.  This assumes that your NIC is wlan0, your SSID is MyNetwork, and the password is SuperSecretPassphrase.
    You need to create a wpa_supplicant-wlan0.conf.  So use wpa_passphrase to generate one:
    # wpa_passphrase MyNetwork SuperSecretPassphrase > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
    Enable it so that it runs on boot:
    # systemctl enable [email protected]
    Now make a file at /etc/systemd/network/00-wireless-dhcp.network (it can really be named whatever you want):
    [Match]
    Name=wlan0
    [Network]
    DHCP=yes
    Now ensure that systemd-networkd.service is enabled.
    # systemctl enable systemd-networkd.service
    Reboot, and it should be working.
    Edit: cleanup
    Edit2: Okay, that is not working for me either...
    Edit3: Okay nevermind, I just made a typo and named my file 00-wireless-dhcp.ntwork
    Edit4: I forgot to mention that you also need to ensure that /etc/resolv.conf is a symlink to /run/systemd/network/resolv.conf.  As a hack (since I don't use systemd-networkd regularly) I have the following:
    $ cat /etc/systemd/system/systemd-networkd.service.d/resolv.conf
    [Service]
    ExecStartPost=/usr/bin/ln -sf /run/systemd/network/resolv.conf /etc/resolv.conf
    ExecStopPost=/usr/bin/rm /etc/resolv.conf
    ExecStopPost=/usr/bin/touch /etc/resolv.conf
    This needs to go to the wiki!

  • Configure vps network with systemd-networkd

    I got a vps and installed archlinux on it, but I can't get the network working using systemd-networkd.
    The mail from the provider have the ip address and gateway (in the rest of the post are redacted respectively 1.2.3.4 and 5.6.7.8), and a note to run two commands after the network setup if configured manually:
    route add 5.6.7.8/32 dev eth0
    route add default gw 5.6.7.8
    I translated the network configuration via the ip utility with:
    ip addr add 1.2.3.4 dev ens3
    ip link set dev ens3 up
    ip route add 5.6.7.8/32 dev ens3
    ip route add default via 5.6.7.8
    With this configuration the network is running, without problems.
    The output for ip route is:
    default via 5.6.7.8 dev ens3
    5.6.7.8 dev ens3 scope link
    Now I'm trying to get the same configuration using systemd-networkd.
    I wrote the following config file:
    $ cat /etc/systemd/network/ens3.network
    [Match]
    Name=ens3
    [Address]
    Address=1.2.3.4/32
    [Route]
    Destination=5.6.7.8/32
    [Route]
    Gateway=5.6.7.8
    After starting systemd-networkd the output from ip addr is the same; the output from ip route is:
    5.6.7.8 dev ens3 proto static
    The network is working partially, I can only ping the gateway, but the rest of the internet is unreachable.
    I read the fine manual, systemd-network(5) and systemd-networkd(8), but I can't get what I'm missing in the network configuration.
    Any help?

    Tried this way, ip route output now is empty.
    On journalctl -xe it says:
    ens3: could not set route: Network is unreachable.
    The multiple [Route] way seems supported:
    http://www.freedesktop.org/software/sys … %20Options
    Specify several "[Route]" sections to configure several routes.

  • Systemd-networkd service takes too long on Compaq Mini Cq10-120LA

    Hi, I'm Oppen. I've been using Arch for around 6 months now, and I'm until now very pleased with it.
    However, I've noticed something that I find odd. I don't consider it necessarily a problem, but it sparks my curiosity.
    I'm running Arch in three different computers.
    One of them is relatively new (well, new, where I'm from, means a 2012 model), an HP Envy m6, running on an AMD A10.
    Another one is relatively old, a Via K8M800, with an Athlon64 x2.
    Both of them present similar boot times in all of the services I'd set up, which are pretty much the same on all of my boxes.
    Then, I have this netbook. It also shows similar times for all services, except for networkd, which takes 10-15 times more than in the other two boxes, with over 5 seconds to finish. I'd like to understand why this is happening, and if possible, to fix it so the boot time will shrink.
    So, I'll continue explaining which are my guesses, any criticism, corrections or ideas are welcome:
    - since my other two boxes run on AMD64, both of them with 64 bits Arch, and this one is an Atom running on i686 Arch, one lead would point to a lack of specific optimizations. But if that's the case, it remains unclear why it only happens with networkd.
    - another guess would point to actually the handshaking taking longer, either because the driver or hardware for wifi is slower or something related to either wpa_supplicant or networkd.
    I tried looking in the forums and google to see if there were any similar issue reported, but I had no luck.
    Thanks in advance for any suggestions or ideas,
    Mario.

    For systemd-networkd, last boot, I get this log.
    ene 29 19:46:41 westeroos systemd-networkd[213]: rtnl: received address for nonexistent link (1), ignoring
    ene 29 19:46:41 westeroos systemd-networkd[213]: rtnl: received address for nonexistent link (1), ignoring
    ene 29 19:46:41 westeroos systemd-networkd[213]: wlan0 : link configured
    ene 29 19:46:43 westeroos systemd-networkd[213]: wlan0 : gained carrier
    I can't make sense of the first two lines, but otherwise it doesn't seem to point out any problems.
    For [email protected], I get this:
    ene 29 08:02:29 westeroos wpa_supplicant[207]: Successfully initialized wpa_supplicant
    ene 29 08:02:29 westeroos wpa_supplicant[207]: wlan0: SME: Trying to authenticate with e0:24:7f:e0:57:4d (SSID='5744' freq=2422 MHz)
    ene 29 08:02:29 westeroos wpa_supplicant[207]: wlan0: Trying to associate with e0:24:7f:e0:57:4d (SSID='5744' freq=2422 MHz)
    ene 29 08:02:29 westeroos wpa_supplicant[207]: wlan0: Associated with e0:24:7f:e0:57:4d
    ene 29 08:02:29 westeroos wpa_supplicant[207]: wlan0: WPA: Key negotiation completed with e0:24:7f:e0:57:4d [PTK=CCMP GTK=CCMP]
    ene 29 08:02:29 westeroos wpa_supplicant[207]: wlan0: CTRL-EVENT-CONNECTED - Connection to e0:24:7f:e0:57:4d completed [id=0 id_str=]
    ene 29 08:02:29 westeroos wpa_supplicant[207]: wlan0: CTRL-EVENT-DISCONNECTED bssid=e0:24:7f:e0:57:4d reason=3 locally_generated=1
    ene 29 08:02:29 westeroos wpa_supplicant[207]: wlan0: CTRL-EVENT-TERMINATING
    Last edited by Oppen (2015-01-30 00:17:09)

  • [SOLVED][systemd-networkd] Cant use dns or something like

    [edit]
    SOLUTION: You need to set a resolv.conf
    [/edit]
    Hi all
    Im trying to use systemd-networkd and its really looks nice.
    BUT I cant use any kind of dns.
    At the moment, Im with this config
    [Match]
    Name=enp2s0
    Host=my-dear-desktop
    [Network]
    DHCP=true
    there is no error or something like on
    systemctl status systemd-networkd
    . I also try some other configs with static dns, nothing work.
    so, i have internet/network connection, but without names =/
    I have tryed many configs like UseDNS=true or DNS=8.8.8.8 at myconfig.network but nothing works.
    $ ping www.google.com
    ping: unknow host www.google.com
    $ ping 173.194.118.145 ##google's IP##
    ##normal ping##
    $ ping my-notebook-localname
    ping: unknow host my-notebook-localname
    $ ping 192.168.25.23 ##notebook local IP##
    ##normal ping##
    Last edited by souenzzo (2014-04-30 00:52:57)

    Not necessary, as your issue was specific to your system, and is unlikely to be encountered by others.
    resolv.conf is provided by the filesystem package, which is of course part of every base Arch install. If it was not present on your system, somebody (or something) deleted it.

  • Systemd-networkd bridge setup

    I want to set up a bridge using systemd-networkd.
    I have the following files in /etc/systemd/network/:
    eth0.network
    ==========
    [Match]
    Name=eth0
    [Network]
    Bridge=br0
    br0.network
    =========
    [Match]
    Name=br0
    [Network]
    Address=192.168.1.10
    Gateway=192.168.1.1
    br0.netdev
    ========
    [NetDev]
    Name=br0
    Kind=bridge
    systemctl reboot and I get 0 connectivity, networkctl shows eth0 in degraded state...
    If i do the same setup using iproute2:
    ip link add name bridge2 type bridge
    ip link set dev bridge2 up
    ip link set dev eth0 promisc on
    ip link set dev eth0 up
    ip link set dev eth0 master bridge2
    ip addr add dev bridge2 192.168.1.1024
    that works just fine, but is lost upon reboot...
    What am I doing wrong?!?!

    Wall of text for troubleshooting:
    [root@odroid-c1 ~]# networkctl
    IDX LINK TYPE OPERATIONAL SETUP
    1 lo loopback carrier unmanaged
    2 eth0 ether degraded configured
    3 wlan0 ether off unmanaged
    4 usbnet0 ether off unmanaged
    5 br0 ether routable configured
    5 links listed.
    [root@odroid-c1 ~]# systemctl status systemd-networkd
    * systemd-networkd.service - Network Service
    Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
    Active: active (running) since Sun 2015-02-22 07:45:07 UTC; 39s ago
    Docs: man:systemd-networkd.service(8)
    Main PID: 196 (systemd-network)
    Status: "Processing requests..."
    CGroup: /system.slice/systemd-networkd.service
    `-196 /usr/lib/systemd/systemd-networkd
    Feb 22 07:45:07 odroid-c1 systemd-networkd[196]: br0 : netdev ready
    Feb 22 07:45:07 odroid-c1 systemd[1]: Started Network Service.
    Feb 22 07:45:07 odroid-c1 systemd-networkd[196]: eth0 : link configured
    Feb 22 07:45:07 odroid-c1 systemd-networkd[196]: br0 : link configured
    Feb 22 07:45:11 odroid-c1 systemd-networkd[196]: eth0 : gained carrier
    Feb 22 07:45:11 odroid-c1 systemd-networkd[196]: br0 : gained carrier
    [root@odroid-c1 ~]# ping 192.168.1.1
    PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
    From 192.168.1.20 icmp_seq=1 Destination Host Unreachable
    ^C
    --- 192.168.1.1 ping statistics ---
    4 packets transmitted, 0 received, +1 errors, 100% packet loss, time 2999ms
    [root@odroid-c1 ~]# cat /etc/systemd/network/eth0.network
    [Match]
    Name=eth0
    [Network]
    Bridge=br0
    [root@odroid-c1 ~]# cat /etc/systemd/network/br0.network
    [Match]
    Name=br0
    [Network]
    Address=192.168.1.20/24
    Gateway=192.168.1.1
    [root@odroid-c1 ~]# cat /etc/systemd/network/br0.netdev
    [NetDev]
    Name=br0
    Kind=bridge
    [root@odroid-c1 ~]# ip route
    default via 192.168.1.1 dev br0 proto static
    192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.20
    [root@odroid-c1 ~]# cat bridge0.sh
    #!/bin/bash
    ip link set dev eth0 promisc off
    ip link set dev eth0 down
    ip link set dev eth0 nomaster
    ip link delete br0 type bridge
    ip link add name br0 type bridge
    ip link set dev br0 up
    ip link set dev eth0 promisc on
    ip link set dev eth0 up
    ip link set dev eth0 master br0
    ip addr add dev br0 192.168.1.20/24
    ip route del default
    ip route add default via 192.168.1.1
    sleep 10
    systemctl restart systemd-resolved
    bridge link show
    [root@odroid-c1 ~]# ./bridge0.sh
    RTNETLINK answers: File exists
    2: eth0 state UP : <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 master br0 state forwarding priority 32 cost 19
    [root@odroid-c1 ~]# ping 192.168.1.1
    PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
    64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=2.05 ms
    ^C
    --- 192.168.1.1 ping statistics ---
    1 packets transmitted, 1 received, 0% packet loss, time 0ms
    rtt min/avg/max/mdev = 2.056/2.056/2.056/0.000 ms
    [root@odroid-c1 ~]# ping google.com
    PING google.com (62.78.98.182) 56(84) bytes of data.
    64 bytes from 62.78.98.182: icmp_seq=1 ttl=58 time=24.2 ms
    64 bytes from 62.78.98.182: icmp_seq=2 ttl=58 time=32.9 ms
    Last edited by blackice (2015-02-22 07:59:56)

  • Can't get conky-cli and bash scripts to both display in dwm statusbar!

    I'm trying to configure my dwm status bar to display some simple information using conky-cli and bash scripts. At first I tried just letting conky run the bash scripts (for network and volume state), but this increased my cpu usage by about 5%, which is significant considering I normally have 1-3% usage when idle. Also, I wanted to keep conky because it makes the display of certain information easy, such as cpu & RAM usage.
    The problem is I'm having trouble getting both to display side by side. Here are the relevant parts of my .xinitrc:
    network(){
    iwconfig wlan0 2>&1 | grep -q no\ wireless\ extensions\. && {
    echo wired
    exit 0
    essid=`iwconfig wlan0 | awk -F '"' '/ESSID/ {print $2}'`
    stngth=`iwconfig wlan0 | awk -F '=' '/Quality/ {print $2}' | cut -d '/' -f 1`
    bars=`expr $stngth / 10`
    case $bars in
    0) bar='[-------]' ;;
    1) bar='[#------]' ;;
    2) bar='[##-----]' ;;
    3) bar='[###----]' ;;
    4) bar='[####---]' ;;
    5) bar='[#####--]' ;;
    6) bar='[######-]' ;;
    7) bar='[#######]' ;;
    *) bar='[--!!!--]' ;;
    esac
    echo $essid$bar
    exit 0
    volume(){
    vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
    echo Vol: $vol%
    exit 0
    conky | while true; read line; do xsetroot -name "`$line` `volume` `network` `date '+%a %m-%d-%Y %I:%M%p'`"; done &
    exec dwm
    (let me know if it would help to post any other files)
    For some reason when I run this I only get the network/volume scripts and date running, updating every second (I think). The conky line just doesn't show up. I don't know what could be wrong, since I didn't see any error messages.
    An even better solution would be to just have shell scripts to display CPU and MEM usage. I have a dual-core cpu, cpu0 and cpu1. I'd like to see both percentages if possible, or at least a percentage that is an accurate average of the two or something. In conky-cli I have something that shows:
    cpu0/1: xx% xx%
    Also, seeing RAM usage would help a lot. In conky it shows:
    mem: xx% (xxxMB)
    These are the ways I would like to have bash scripts show them, if possible, but I have zero skill in bash programming. I made this an option in case it's easier/cleaner/less resource hungry than a conky solution. Personally, if they're about the same in these aspects, I would prefer something with conky and the shell scripts because conky is so extensible, yet it's only flaw is executing scripts with minimal resource usage.
    Help?

    Thanks. I was thinking of using load average to save a few characters, but I didn't quite understand the numbers. I'll try that once I get to my Linux box, but could you please explain or post a link to something that explains load average (what's low, high, normal, etc.)?
    EDIT: I found a website that explains loadavg. I now have my dwm status bar displaying it perfectly (yay!). Now I just need to add a few more things like battery status, etc. and I might be done. I'll probably post here if I have more questions, though.
    Thanks for your help!
    Last edited by Allamgir (2009-07-18 14:41:11)

  • Error with dbms_scheduler and shell script execution

    Hi,guys.
    I have an issue with a dbms_scheduler and a shell script execution. So, the shell script as it self works fine, when i'm executing ./test.sh all process is running, but when i'm executing the script from dbms_scheduler it just simply doesn't work. Actually it works, but some of executable information in sh doesn't work, seems it just jump over of the part of the script. Sendmail part is running, maybe there is problem with rman script as it self?
    DB version: 10g
    And my scripts:
    Shell scripts (permisons 755):
    #!/bin/ksh
    export PATH=/home/oracle/product/asm_home/bin:/home/oracle/product/db_home/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/oracle/bin:/usr/bin/X11:/sbin:.
    export ORACLE_BASE=/home/oracle/product
    export ORACLE_SID=zabbix
    export ORACLE_HOME=/home/oracle/product/db_home
    ${ORACLE_HOME}/bin/rman<<EOF
    connect target /
    run {backup recovery area delete all input;}
    EOF
    {       echo "From:[email protected]"
            echo "To: [email protected]"
            echo "Subject: Recovery area"
            echo 'Content-Type: text/html'
            echo
            echo '<html><body><table border="1" cellspacing="1">'
            echo '<tr><td><b>Process</b></td><td><b>Statuss</b></td></tr>'
            echo "<tr><td>RMAN</td><td><b>Works</b></td></tr>"
            echo "</table></body></html>"
    } | sendmail -tIn the first part i'm exporting all of the important stuff for oracle, then I call RMAN with specific atributes. And then there is just simply sendmail functionality inside script to represent if script works (for now).
    And below pl/sql script:
    begin
      DBMS_SCHEDULER.CREATE_JOB
      job_name => 'FLASH_RECOVERY',
      job_type => 'EXECUTABLE',
      job_action => '/home/oracle/backup/test.sh',
      start_date => sysdate,
      job_class => 'DEFAULT_JOB_CLASS',
      enabled => TRUE,
      auto_drop => FALSE,
      comments => 'FLASH RECOVERY USAGE AREA backup and delete'
      END;
      /And this job execution:
           begin
               DBMS_SCHEDULER.run_job (job_name =>'FLASH_RECOVERY',use_current_session => TRUE);
           end;What can be wrong? For me, I think it's something with permisions.
    I hope you got my idea and could help me.
    Tom
    Edited by: safazaurs on 2013.18.2 22:16

    There is no error, i just receive all the time e-mail, seems it jumps over rman. I tried almost everything and still couldn't get result as i want. And, if i'm running script from command line - it works. Rman calls, and starts to recover archivelogs.

  • Render and Email script

    Hello everybody. I have a question that I have thoroughly researched on the web with no results.
    I am trying to get the default After Effects "Render and Email" script to run properly. I have only been able to successfully send FROM one specific email address TO another (slightly less specific) email address. Most other email services I put in (icloud, gmail, etc) all give strange errors upon execution.
    For the SENDING email address, I'm currently using one I created that is a part of my web hosting account (this is the only account I am able to successfully send from). For RECEIVING, I've only successfully gotten my gmail address to work. All other receiving addresses don't always give me error, but also never show up. Either that, or I get very weird errors. The most common one I get is "Unaable to send mail. 533 5.7.1 AUTH command is not enabled."
    I haven't been able to find this error documented anywhere online. I'd like to be able to send emails to my icloud account, since it pushes email notifications to my phone in real time.
    Long ago someone by the name of Ko Maruyama supposedly explained all this in detail, but the writeup was posted on a .mac website (http://homepage.mac.com/komaruyama/Tutorials/AE/AE_javamail/AE_mail.html), which Apple officially discontinued/took down several years ago.
    Does anyone have any experience with this?

    For Mac, the path is of course slightly different. If you cannot delete the file, you should at least be able to edit it in Extend Script Toolkit or any text editor or run the script separately to change its config data. Works for me...
    Mylenium

  • Need flash player 8 and java script enabled to play videos on ipad, need help please.

    need flash player 8 and java script enabled on my ipad in order to view videos.  please help.

    iPads do not directly support Flash.
    You can look for Flash Browsers in the App store for some options to try. Support is not 100%, but maybe one may work for you.  Browsers like Puffin, Skyfire, Photon etc...
    IPads do fully support JavaScript.  Just make sure its turned on under Settings->Safari->Advanced->JavaScript.
    If you require Java, which is completely different to JavaScript, again there are some browsers in the App store that support it.  Search for "Java browsers" in the store.

  • ICal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed on alert.

    iCal failing to run applescripts: The 'Open' button does not change to 'Run', and the script file is opened but not executed.

    Calendar (not called iCal anymore) does not include that capability any longer, apparently.  What you have to do now is go to Automator and create a Calendar Alert action.  You can add a Run AppleScript object to the action and paste in your script there, then when you save it, it will become available as a choice in the alert menu in Calendar.

  • Degree Symbol and Sub-Scripts in XML

    I'm more of a designer and really don't know that much about code. I know just enough XML to use it in InDesign, the thing is I am having trouble finding a way to use the degree symbol and sub-scripts in the XML data I import into InDesign. The HTML codes like &deg and &#176 don't work, InDesign tells me that they are "not well formed". I'm using UTF-8. Is there another encoding I could use that allows me to use symbols and subscripts?

    if you use utf-8 simply but the real character into the data.
    named character entities such as
    &deg;
    has to be declared in your dtd.
    with character entities such as
    &#x00B0; or &#176;
    are working fine.
    regards,
    gregor

Maybe you are looking for

  • I downloaded acrobat pro, wont open... error 16

    i downloaded acrobat pro, wont open... error 16 - aid to go to your website

  • Problem in Create Routing

    Hi folks, I have using BAPI_ROUTING_CREATE for routing creation. Its working well for all conditions.But in case of Component Allocation i am getting the below error msg, i have passed the following fields Activity,BOMTYPE,BOMNO,ALTERNATIVEBOM,QTY,UN

  • WGate not connecting to Agate u0096 Download Pop-Up instead

    When entering http://domain/scripts/wgate/IAC/! instead of starting the IAC I get the Opening ! Pop-up asking to save “!”   I moving an existing working dual-host system from WIN2000 servers to WIN2003 servers 32bit.  ITS v6.2 patch12.  I’ve compared

  • Mms to servlet general methodology?

    I am working on a project that involves mobile device to servlet communication. It allows doctors to submit voice-recorded requests for medical information. The recorded data is run thru speech recognition and nlp software and used to generate variou

  • Nokia 6500c Firmware Issue

    Just flashed to latest firmware and what a shock ive got a problem here is what happend - its a new phone all working ok with all default codes i upgraded and now in the call duration to reset the timers will not accept the default code as it did bef